diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-04-16 12:17:38 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-04-25 00:16:52 -0400 |
commit | 9aebfd6bda789891e6d296bb49b5fb32d1057f18 (patch) | |
tree | e7e3fe4d29bd36e255c9007cba10dabebb08a599 | |
parent | 0ba4034e20abf372dae6c6cabeeeab600acb5889 (diff) |
USB: serial: remove endpoints setting checks from core and header
Remove the unused check for num_interrupt and friends as well as remove
them from the header file because no usb-serial drivers no longer
reference them.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/usb/serial/usb-serial.c | 16 | ||||
-rw-r--r-- | include/linux/usb/serial.h | 18 |
2 files changed, 0 insertions, 34 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index aea861e9173e..5b464811fa4d 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
@@ -861,22 +861,6 @@ int usb_serial_probe(struct usb_interface *interface, | |||
861 | serial->num_interrupt_in = num_interrupt_in; | 861 | serial->num_interrupt_in = num_interrupt_in; |
862 | serial->num_interrupt_out = num_interrupt_out; | 862 | serial->num_interrupt_out = num_interrupt_out; |
863 | 863 | ||
864 | #if 0 | ||
865 | /* check that the device meets the driver's requirements */ | ||
866 | if ((type->num_interrupt_in != NUM_DONT_CARE && | ||
867 | type->num_interrupt_in != num_interrupt_in) | ||
868 | || (type->num_interrupt_out != NUM_DONT_CARE && | ||
869 | type->num_interrupt_out != num_interrupt_out) | ||
870 | || (type->num_bulk_in != NUM_DONT_CARE && | ||
871 | type->num_bulk_in != num_bulk_in) | ||
872 | || (type->num_bulk_out != NUM_DONT_CARE && | ||
873 | type->num_bulk_out != num_bulk_out)) { | ||
874 | dbg("wrong number of endpoints"); | ||
875 | kfree(serial); | ||
876 | return -EIO; | ||
877 | } | ||
878 | #endif | ||
879 | |||
880 | /* found all that we need */ | 864 | /* found all that we need */ |
881 | dev_info(&interface->dev, "%s converter detected\n", | 865 | dev_info(&interface->dev, "%s converter detected\n", |
882 | type->description); | 866 | type->description); |
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index f1b7434a96bf..8f891cbaf9ab 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -145,8 +145,6 @@ struct usb_serial { | |||
145 | }; | 145 | }; |
146 | #define to_usb_serial(d) container_of(d, struct usb_serial, kref) | 146 | #define to_usb_serial(d) container_of(d, struct usb_serial, kref) |
147 | 147 | ||
148 | #define NUM_DONT_CARE 99 | ||
149 | |||
150 | /* get and set the serial private data pointer helper functions */ | 148 | /* get and set the serial private data pointer helper functions */ |
151 | static inline void *usb_get_serial_data(struct usb_serial *serial) | 149 | static inline void *usb_get_serial_data(struct usb_serial *serial) |
152 | { | 150 | { |
@@ -164,18 +162,6 @@ static inline void usb_set_serial_data(struct usb_serial *serial, void *data) | |||
164 | * used in the syslog messages when a device is inserted or removed. | 162 | * used in the syslog messages when a device is inserted or removed. |
165 | * @id_table: pointer to a list of usb_device_id structures that define all | 163 | * @id_table: pointer to a list of usb_device_id structures that define all |
166 | * of the devices this structure can support. | 164 | * of the devices this structure can support. |
167 | * @num_interrupt_in: If a device doesn't have this many interrupt-in | ||
168 | * endpoints, it won't be sent to the driver's attach() method. | ||
169 | * (But it might still be sent to the probe() method.) | ||
170 | * @num_interrupt_out: If a device doesn't have this many interrupt-out | ||
171 | * endpoints, it won't be sent to the driver's attach() method. | ||
172 | * (But it might still be sent to the probe() method.) | ||
173 | * @num_bulk_in: If a device doesn't have this many bulk-in | ||
174 | * endpoints, it won't be sent to the driver's attach() method. | ||
175 | * (But it might still be sent to the probe() method.) | ||
176 | * @num_bulk_out: If a device doesn't have this many bulk-out | ||
177 | * endpoints, it won't be sent to the driver's attach() method. | ||
178 | * (But it might still be sent to the probe() method.) | ||
179 | * @num_ports: the number of different ports this device will have. | 165 | * @num_ports: the number of different ports this device will have. |
180 | * @calc_num_ports: pointer to a function to determine how many ports this | 166 | * @calc_num_ports: pointer to a function to determine how many ports this |
181 | * device has dynamically. It will be called after the probe() | 167 | * device has dynamically. It will be called after the probe() |
@@ -211,10 +197,6 @@ static inline void usb_set_serial_data(struct usb_serial *serial, void *data) | |||
211 | struct usb_serial_driver { | 197 | struct usb_serial_driver { |
212 | const char *description; | 198 | const char *description; |
213 | const struct usb_device_id *id_table; | 199 | const struct usb_device_id *id_table; |
214 | char num_interrupt_in; | ||
215 | char num_interrupt_out; | ||
216 | char num_bulk_in; | ||
217 | char num_bulk_out; | ||
218 | char num_ports; | 200 | char num_ports; |
219 | 201 | ||
220 | struct list_head driver_list; | 202 | struct list_head driver_list; |