[PATCH] make cx3110x buildable for 770 running 2.6.18
Marcin Juszkiewicz
openembedded at haerwu.biz
Thu Apr 10 22:45:43 EEST 2008
In Poky we use 2.6.18 kernel on Nokia 770 tablet. This is version from
OS2007/N800. We also do some mangling to get 2.6.16.27 umac.ko working
under 2.6.18 but thats other story.
This patch makes cx3110x 1.2 version buildable for Nokia 770/2.6.18.
Signed-off-by: Marcin Juszkiewicz <hrw at openedhand.com>
---
src/sm_drv.h | 3 ++-
src/sm_drv_spi_io.c | 5 +++--
2 files changed, 5 insertions(+), 3 deletions(-)
--- cx3110x-1.1.orig/src/sm_drv.h
+++ cx3110x-1.1/src/sm_drv.h
@@ -19,10 +19,11 @@
*/
#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <linux/wireless.h>
#include <linux/delay.h>
+#include <linux/version.h>
#include <asm/io.h>
#include "sm_drv_spi.h"
#include "smoid2.h"
@@ -187,11 +188,11 @@ struct net_local {
unsigned int sm_initialization;
uint32_t device_state; /* Powersave/Active */
uint32_t link_state; /* Assciated or not */
-#ifdef CONFIG_MACH_NOKIA_N800
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17))
struct work_struct wq; /* Our bottom halve (BH) handler */
#endif /* CONFIG_MACH_NOKIA_N800 */
#ifdef CONFIG_MACH_NOKIA770
struct tasklet_struct tasklet; /* Our bottom halve (BH) handler */
--- cx3110x-1.1.orig/src/sm_drv_spi_io.c
+++ cx3110x-1.1/src/sm_drv_spi_io.c
@@ -13,13 +13,14 @@
*
*/
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
-#ifdef CONFIG_MACH_NOKIA_N800
+#include <linux/version.h>
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17))
#include <linux/irq.h>
-#endif /* CONFIG_MACH_NOKIA_N800 */
+#endif
#include <linux/dma-mapping.h>
#include <linux/clk.h>
#include <linux/spi/spi.h>
#include <asm/delay.h>
--
JID: hrw-jabber.org
OpenEmbedded developer/consultant
Truly a man of few words. I'll bet you don't know what either one of them
means.
More information about the cx3110x-devel
mailing list