lkml.org 
[lkml]   [2000]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] fix compile problem in belkin_sa.c

Hi,

Here's a patch that fixes the compile time problem in 2.4.0-test11-pre3
for the belkin_sa.c usb serial driver. It also takes care of the two
compile time warnings.

Thanks,

greg k-h

--
greg@(kroah|wirex).com
diff -Naur -X /home/greg/linux/dontdiff linux-2.4.0-test11-pre3/drivers/usb/serial/belkin_sa.c linux-2.4.0-test11-pre3-greg/drivers/usb/serial/belkin_sa.c
--- linux-2.4.0-test11-pre3/drivers/usb/serial/belkin_sa.c Sun Nov 12 10:07:33 2000
+++ linux-2.4.0-test11-pre3-greg/drivers/usb/serial/belkin_sa.c Sun Nov 12 10:23:12 2000
@@ -85,13 +85,35 @@
static int belkin_sa_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg);
static void belkin_sa_break_ctl (struct usb_serial_port *port, int break_state );

+
+static __devinitdata struct usb_device_id id_table_combined [] = {
+ { idVendor: BELKIN_SA_VID, idProduct: BELKIN_SA_PID },
+ { idVendor: BELKIN_OLD_VID, idProduct: BELKIN_OLD_PID },
+ { idVendor: PERACOM_VID, idProduct: PERACOM_PID },
+ { } /* Terminating entry */
+};
+
+static __devinitdata struct usb_device_id belkin_sa_table [] = {
+ { idVendor: BELKIN_SA_VID, idProduct: BELKIN_SA_PID },
+ { } /* Terminating entry */
+};
+
+static __devinitdata struct usb_device_id belkin_old_table [] = {
+ { idVendor: BELKIN_OLD_VID, idProduct: BELKIN_OLD_PID },
+ { } /* Terminating entry */
+};
+
+static __devinitdata struct usb_device_id peracom_table [] = {
+ { idVendor: PERACOM_VID, idProduct: PERACOM_PID },
+ { } /* Terminating entry */
+};
+
+MODULE_DEVICE_TABLE (usb, id_table_combined);
+
/* All of the device info needed for the Belkin serial converter */
-static __u16 belkin_sa_vendor_id = BELKIN_SA_VID;
-static __u16 belkin_sa_product_id = BELKIN_SA_PID;
struct usb_serial_device_type belkin_sa_device = {
name: "Belkin F5U103 USB Serial Adapter",
- idVendor: &belkin_sa_vendor_id, /* the Belkin vendor ID */
- idProduct: &belkin_sa_product_id, /* the Belkin F5U103 product id */
+ id_table: belkin_sa_table, /* the Belkin F5U103 device */
needs_interrupt_in: MUST_HAVE, /* this device must have an interrupt in endpoint */
needs_bulk_in: MUST_HAVE, /* this device must have a bulk in endpoint */
needs_bulk_out: MUST_HAVE, /* this device must have a bulk out endpoint */
@@ -111,12 +133,9 @@


/* This driver also supports the "old" school Belkin single port adaptor */
-static __u16 belkin_old_vendor_id = BELKIN_OLD_VID;
-static __u16 belkin_old_product_id = BELKIN_OLD_PID;
struct usb_serial_device_type belkin_old_device = {
name: "Belkin USB Serial Adapter",
- idVendor: &belkin_old_vendor_id, /* the Belkin vendor ID */
- idProduct: &belkin_old_product_id, /* the Belkin product id */
+ id_table: belkin_old_table, /* the old Belkin device */
needs_interrupt_in: MUST_HAVE, /* this device must have an interrupt in endpoint */
needs_bulk_in: MUST_HAVE, /* this device must have a bulk in endpoint */
needs_bulk_out: MUST_HAVE, /* this device must have a bulk out endpoint */
@@ -135,12 +154,9 @@
};

/* this driver also works for the Peracom single port adapter */
-static __u16 peracom_vendor_id = PERACOM_VID;
-static __u16 peracom_product_id = PERACOM_PID;
struct usb_serial_device_type peracom_device = {
name: "Peracom single port USB Serial Adapter",
- idVendor: &peracom_vendor_id, /* the Peracom vendor ID */
- idProduct: &peracom_product_id, /* the Peracom product id */
+ id_table: peracom_table, /* the Peracom device */
needs_interrupt_in: MUST_HAVE, /* this device must have an interrupt in endpoint */
needs_bulk_in: MUST_HAVE, /* this device must have a bulk in endpoint */
needs_bulk_out: MUST_HAVE, /* this device must have a bulk out endpoint */
@@ -284,7 +300,6 @@
struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
struct belkin_sa_private *priv = (struct belkin_sa_private *)port->private;
struct usb_serial *serial;
- struct tty_struct *tty;
unsigned char *data = urb->transfer_buffer;

/* the urb might have been killed. */
@@ -360,7 +375,7 @@
unsigned int cflag = port->tty->termios->c_cflag;
unsigned int old_iflag = old_termios->c_iflag;
unsigned int old_cflag = old_termios->c_cflag;
- __u16 urb_value; /* Will hold the new flags */
+ __u16 urb_value = 0; /* Will hold the new flags */

/* Set the baud rate */
if( (cflag&CBAUD) != (old_cflag&CBAUD) ) {[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 12:45    [W:0.024 / U:12.052 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site