Commit fd7f6a57 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

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

parent 70f7aa08
...@@ -416,8 +416,7 @@ static struct usb_serial *get_free_serial (struct usb_serial *serial, int num_po ...@@ -416,8 +416,7 @@ static struct usb_serial *get_free_serial (struct usb_serial *serial, int num_po
} }
if (good_spot == 0) if (good_spot == 0)
continue; continue;
serial->magic = USB_SERIAL_MAGIC;
*minor = i; *minor = i;
dbg("%s - minor base = %d", __FUNCTION__, *minor); dbg("%s - minor base = %d", __FUNCTION__, *minor);
for (i = *minor; (i < (*minor + num_ports)) && (i < SERIAL_TTY_MINORS); ++i) for (i = *minor; (i < (*minor + num_ports)) && (i < SERIAL_TTY_MINORS); ++i)
......
...@@ -62,8 +62,6 @@ ...@@ -62,8 +62,6 @@
#define MAX_NUM_PORTS 8 /* The maximum number of ports one device can grab at once */ #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 */ /* parity check flag */
#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK)) #define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
...@@ -130,7 +128,6 @@ static inline void usb_set_serial_port_data (struct usb_serial_port *port, void ...@@ -130,7 +128,6 @@ static inline void usb_set_serial_port_data (struct usb_serial_port *port, void
/** /**
* usb_serial - structure used by the usb-serial core for a device * 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 * @dev: pointer to the struct usb_device for this device
* @type: pointer to the struct usb_serial_device_type 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 * @interface: pointer to the struct usb_interface for this device
...@@ -148,7 +145,6 @@ static inline void usb_set_serial_port_data (struct usb_serial_port *port, void ...@@ -148,7 +145,6 @@ static inline void usb_set_serial_port_data (struct usb_serial_port *port, void
* usb_set_serial_data() to access this. * usb_set_serial_data() to access this.
*/ */
struct usb_serial { struct usb_serial {
int magic;
struct usb_device * dev; struct usb_device * dev;
struct usb_serial_device_type * type; struct usb_serial_device_type * type;
struct usb_interface * interface; struct usb_interface * interface;
...@@ -305,10 +301,6 @@ static inline int serial_paranoia_check (struct usb_serial *serial, const char * ...@@ -305,10 +301,6 @@ static inline int serial_paranoia_check (struct usb_serial *serial, const char *
dbg("%s - serial == NULL", function); dbg("%s - serial == NULL", function);
return -1; return -1;
} }
if (serial->magic != USB_SERIAL_MAGIC) {
dbg("%s - bad magic number for serial", function);
return -1;
}
if (!serial->type) { if (!serial->type) {
dbg("%s - serial->type == NULL!", function); dbg("%s - serial->type == NULL!", function);
return -1; return -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment