aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/usb-serial.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2005-06-21 00:15:16 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-28 19:47:47 -0400
commitea65370d025f5005649e5cb37c4d025e92c6fc38 (patch)
tree554476fb8c69fc0f0f7dc5e2287f4c9cec1a26d6 /drivers/usb/serial/usb-serial.h
parenta6c82600d4058346ea6fd801bc21d7abcc1350d8 (diff)
[PATCH] USB Serial: rename usb_serial_device_type to usb_serial_driver
I'm tired of trying to explain why a "device_type" is really a driver. This better describes exactly what this structure is. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/usb-serial.h')
-rw-r--r--drivers/usb/serial/usb-serial.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/usb/serial/usb-serial.h b/drivers/usb/serial/usb-serial.h
index 57f92f054c75..d6738b1b0429 100644
--- a/drivers/usb/serial/usb-serial.h
+++ b/drivers/usb/serial/usb-serial.h
@@ -143,7 +143,7 @@ static inline void usb_set_serial_port_data (struct usb_serial_port *port, void
143/** 143/**
144 * usb_serial - structure used by the usb-serial core for a device 144 * usb_serial - structure used by the usb-serial core for a device
145 * @dev: pointer to the struct usb_device for this device 145 * @dev: pointer to the struct usb_device for this device
146 * @type: pointer to the struct usb_serial_device_type for this device 146 * @type: pointer to the struct usb_serial_driver for this device
147 * @interface: pointer to the struct usb_interface for this device 147 * @interface: pointer to the struct usb_interface for this device
148 * @minor: the starting minor number for this device 148 * @minor: the starting minor number for this device
149 * @num_ports: the number of ports this device has 149 * @num_ports: the number of ports this device has
@@ -159,7 +159,7 @@ static inline void usb_set_serial_port_data (struct usb_serial_port *port, void
159 */ 159 */
160struct usb_serial { 160struct usb_serial {
161 struct usb_device * dev; 161 struct usb_device * dev;
162 struct usb_serial_device_type * type; 162 struct usb_serial_driver * type;
163 struct usb_interface * interface; 163 struct usb_interface * interface;
164 unsigned char minor; 164 unsigned char minor;
165 unsigned char num_ports; 165 unsigned char num_ports;
@@ -188,11 +188,11 @@ static inline void usb_set_serial_data (struct usb_serial *serial, void *data)
188} 188}
189 189
190/** 190/**
191 * usb_serial_device_type - a structure that defines a usb serial device 191 * usb_serial_driver - describes a usb serial driver
192 * @owner: pointer to the module that owns this device. 192 * @owner: pointer to the module that owns this driver.
193 * @name: pointer to a string that describes this device. This string used 193 * @name: pointer to a string that describes this driver. This string used
194 * in the syslog messages when a device is inserted or removed. 194 * in the syslog messages when a device is inserted or removed.
195 * @short_name: a pointer to a string that describes this device in 195 * @short_name: a pointer to a string that describes this driver in
196 * KOBJ_NAME_LEN characters or less. This is used for the sysfs interface 196 * KOBJ_NAME_LEN characters or less. This is used for the sysfs interface
197 * to describe the driver. 197 * to describe the driver.
198 * @id_table: pointer to a list of usb_device_id structures that define all 198 * @id_table: pointer to a list of usb_device_id structures that define all
@@ -221,13 +221,13 @@ static inline void usb_set_serial_data (struct usb_serial *serial, void *data)
221 * @shutdown: pointer to the driver's shutdown function. This will be 221 * @shutdown: pointer to the driver's shutdown function. This will be
222 * called when the device is removed from the system. 222 * called when the device is removed from the system.
223 * 223 *
224 * This structure is defines a USB Serial device. It provides all of 224 * This structure is defines a USB Serial driver. It provides all of
225 * the information that the USB serial core code needs. If the function 225 * the information that the USB serial core code needs. If the function
226 * pointers are defined, then the USB serial core code will call them when 226 * pointers are defined, then the USB serial core code will call them when
227 * the corresponding tty port functions are called. If they are not 227 * the corresponding tty port functions are called. If they are not
228 * called, the generic serial function will be used instead. 228 * called, the generic serial function will be used instead.
229 */ 229 */
230struct usb_serial_device_type { 230struct usb_serial_driver {
231 struct module *owner; 231 struct module *owner;
232 char *name; 232 char *name;
233 char *short_name; 233 char *short_name;
@@ -269,10 +269,10 @@ struct usb_serial_device_type {
269 void (*read_bulk_callback)(struct urb *urb, struct pt_regs *regs); 269 void (*read_bulk_callback)(struct urb *urb, struct pt_regs *regs);
270 void (*write_bulk_callback)(struct urb *urb, struct pt_regs *regs); 270 void (*write_bulk_callback)(struct urb *urb, struct pt_regs *regs);
271}; 271};
272#define to_usb_serial_driver(d) container_of(d, struct usb_serial_device_type, driver) 272#define to_usb_serial_driver(d) container_of(d, struct usb_serial_driver, driver)
273 273
274extern int usb_serial_register(struct usb_serial_device_type *new_device); 274extern int usb_serial_register(struct usb_serial_driver *driver);
275extern void usb_serial_deregister(struct usb_serial_device_type *device); 275extern void usb_serial_deregister(struct usb_serial_driver *driver);
276extern void usb_serial_port_softint(void *private); 276extern void usb_serial_port_softint(void *private);
277 277
278extern int usb_serial_probe(struct usb_interface *iface, const struct usb_device_id *id); 278extern int usb_serial_probe(struct usb_interface *iface, const struct usb_device_id *id);
@@ -303,10 +303,10 @@ extern void usb_serial_generic_shutdown (struct usb_serial *serial);
303extern int usb_serial_generic_register (int debug); 303extern int usb_serial_generic_register (int debug);
304extern void usb_serial_generic_deregister (void); 304extern void usb_serial_generic_deregister (void);
305 305
306extern int usb_serial_bus_register (struct usb_serial_device_type *device); 306extern int usb_serial_bus_register (struct usb_serial_driver *device);
307extern void usb_serial_bus_deregister (struct usb_serial_device_type *device); 307extern void usb_serial_bus_deregister (struct usb_serial_driver *device);
308 308
309extern struct usb_serial_device_type usb_serial_generic_device; 309extern struct usb_serial_driver usb_serial_generic_device;
310extern struct bus_type usb_serial_bus_type; 310extern struct bus_type usb_serial_bus_type;
311extern struct tty_driver *usb_serial_tty_driver; 311extern struct tty_driver *usb_serial_tty_driver;
312 312