gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DKU2 module not compiling


From: Pawel Kot
Subject: Re: DKU2 module not compiling
Date: Tue, 4 Apr 2006 23:48:00 +0200

Hi Chris,

On 4/4/06, Chris Kemp <address@hidden> wrote:
> On 04/04/06 21:22:48, Daniel Gollub wrote:
> > The dku2 module is not working with kernel version newer then 2.6.14
> > because
> > of api changes. Pawel is working on a libusb based driver which
> > should solve kernel api changes:
>
> For the meantime, I've just committed
>
>    patches/kernel_2.6/nokia_dku2.c.2_6_15
>
> to CVS.  This works with 2.6.15 for me.

I haven't diffed the files yet, but could you please take a look at
the patch I forwarded to the  mailing list? If it is fine, we could
have something like:

Index: nokia_dku2.c
===================================================================
RCS file: /cvsroot/gnokii/gnokii/patches/kernel_2.6/nokia_dku2.c,v
retrieving revision 1.9
diff -u -r1.9 nokia_dku2.c
--- nokia_dku2.c        17 Oct 2005 20:53:59 -0000      1.9
+++ nokia_dku2.c        4 Apr 2006 21:47:11 -0000
@@ -31,6 +31,7 @@
 #include <linux/tty_flip.h>
 #include <linux/module.h>
 #include <linux/usb.h>
+#include <linux/version.h>

 #ifdef CONFIG_USB_SERIAL_DEBUG
        static int debug = 1;
@@ -71,6 +72,7 @@
        .id_table =     id_table,
 };

+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15))
 static struct usb_serial_device_type nokia_device = {
        .owner =                THIS_MODULE,
        .name =                 "Nokia 7600/6230(i)/6170/66x0 DKU2 driver",
@@ -82,7 +84,17 @@
        .num_ports =            1,
        .probe =                nokia_probe
 };
-
+#else
+static struct usb_serial_device nokia_device = {
+       .description =          "Nokia 7600/6230(i)/6170/66x0 DKU2 driver",
+       .id_table =             id_table,
+       .num_interrupt_in =     1,
+       .num_bulk_in =          1,
+       .num_bulk_out =         1,
+       .num_ports =            1,
+       .probe =                nokia_probe
+};
+#endif
 /* The only thing which makes this device different from a generic
device is that */
 /* we have to set an alternative configuration to make the relevant
endpoints available */
 /* In 2.6 this is really easy... */

--
Pawel Kot
http://www.gnokii.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]