linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: "Dunlap, Randy" <randy.dunlap@intel.com>
Cc: wgreathouse@smva.com, linux-usb-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: [PATCH] fix compile problem in belkin_sa.c
Date: Sun, 12 Nov 2000 10:41:12 -0800	[thread overview]
Message-ID: <20001112104112.A13058@kroah.com> (raw)


[-- 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 --]

                 reply	other threads:[~2000-11-12 18:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20001112104112.A13058@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=randy.dunlap@intel.com \
    --cc=wgreathouse@smva.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).