ChangeSet 1.1635, 2004/05/14 10:50:40-07:00, [EMAIL PROTECTED]

USB: remove magic number field from usb_serial_port as it's pretty useless.


 drivers/usb/serial/usb-serial.c |    1 -
 drivers/usb/serial/usb-serial.h |    9 +--------
 2 files changed, 1 insertion(+), 9 deletions(-)


diff -Nru a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
--- a/drivers/usb/serial/usb-serial.c   Fri May 14 15:27:38 2004
+++ b/drivers/usb/serial/usb-serial.c   Fri May 14 15:27:39 2004
@@ -1117,7 +1117,6 @@
                memset(port, 0x00, sizeof(struct usb_serial_port));
                port->number = i + serial->minor;
                port->serial = serial;
-               port->magic = USB_SERIAL_PORT_MAGIC;
                INIT_WORK(&port->work, usb_serial_port_softint, port);
                serial->port[i] = port;
        }
diff -Nru a/drivers/usb/serial/usb-serial.h b/drivers/usb/serial/usb-serial.h
--- a/drivers/usb/serial/usb-serial.h   Fri May 14 15:27:39 2004
+++ b/drivers/usb/serial/usb-serial.h   Fri May 14 15:27:39 2004
@@ -63,14 +63,12 @@
 #define MAX_NUM_PORTS          8       /* The maximum number of ports one device can 
grab at once */
 
 #define USB_SERIAL_MAGIC       0x6702  /* magic number for usb_serial struct */
-#define USB_SERIAL_PORT_MAGIC  0x7301  /* magic number for usb_serial_port struct */
 
 /* parity check flag */
 #define RELEVANT_IFLAG(iflag)  (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
 
 /**
  * usb_serial_port: structure for the specific ports of a device.
- * @magic: magic number for internal validity of this pointer.
  * @serial: pointer back to the struct usb_serial owner of this port.
  * @tty: pointer to the corresponding tty for this port.
  * @number: the number of the port (the minor number).
@@ -95,8 +93,7 @@
  * ports of a device.
  */
 struct usb_serial_port {
-       int                     magic;
-       struct usb_serial       *serial;
+       struct usb_serial *     serial;
        struct tty_struct *     tty;
        unsigned char           number;
 
@@ -325,10 +322,6 @@
 {
        if (!port) {
                dbg("%s - port == NULL", function);
-               return -1;
-       }
-       if (port->magic != USB_SERIAL_PORT_MAGIC) {
-               dbg("%s - bad magic number for port", function);
                return -1;
        }
        if (!port->serial) {



-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id%62&alloc_ida84&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to