public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix compile problem in belkin_sa.c
@ 2000-11-12 18:41 Greg KH
  0 siblings, 0 replies; only message in thread
From: Greg KH @ 2000-11-12 18:41 UTC (permalink / raw)
  To: Dunlap, Randy; +Cc: wgreathouse, linux-usb-devel, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 231 bytes --]


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

[-- Attachment #1.2: usb-belkin-2.4.0-test11-pre3.diff --]
[-- Type: text/plain, Size: 4293 bytes --]

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) ) {

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-11-12 18:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-11-12 18:41 [PATCH] fix compile problem in belkin_sa.c Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox