ChangeSet 1.1636, 2004/05/14 10:52:34-07:00, [EMAIL PROTECTED]

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


 drivers/usb/serial/usb-serial.c |    3 +--
 drivers/usb/serial/usb-serial.h |    8 --------
 2 files changed, 1 insertion(+), 10 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:34 2004
+++ b/drivers/usb/serial/usb-serial.c   Fri May 14 15:27:34 2004
@@ -416,8 +416,7 @@
                        }
                if (good_spot == 0)
                        continue;
-                       
-               serial->magic = USB_SERIAL_MAGIC;
+
                *minor = i;
                dbg("%s - minor base = %d", __FUNCTION__, *minor);
                for (i = *minor; (i < (*minor + num_ports)) && (i < 
SERIAL_TTY_MINORS); ++i)
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:34 2004
+++ b/drivers/usb/serial/usb-serial.h   Fri May 14 15:27:34 2004
@@ -62,8 +62,6 @@
 
 #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 */
-
 /* parity check flag */
 #define RELEVANT_IFLAG(iflag)  (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
 
@@ -130,7 +128,6 @@
 
 /**
  * usb_serial - structure used by the usb-serial core for a device
- * @magic: magic number for internal validity of this pointer.
  * @dev: pointer to the struct usb_device for this device
  * @type: pointer to the struct usb_serial_device_type for this device
  * @interface: pointer to the struct usb_interface for this device
@@ -148,7 +145,6 @@
  *     usb_set_serial_data() to access this.
  */
 struct usb_serial {
-       int                             magic;
        struct usb_device *             dev;
        struct usb_serial_device_type * type;
        struct usb_interface *          interface;
@@ -303,10 +299,6 @@
 {
        if (!serial) {
                dbg("%s - serial == NULL", function);
-               return -1;
-       }
-       if (serial->magic != USB_SERIAL_MAGIC) {
-               dbg("%s - bad magic number for serial", function);
                return -1;
        }
        if (!serial->type) {



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