]> err.no Git - linux-2.6/commitdiff
[PATCH] USB Serial: rename usb_serial_device_type to usb_serial_driver
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 21 Jun 2005 04:15:16 +0000 (21:15 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 28 Oct 2005 23:47:47 +0000 (16:47 -0700)
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>
31 files changed:
drivers/usb/serial/airprime.c
drivers/usb/serial/belkin_sa.c
drivers/usb/serial/bus.c
drivers/usb/serial/cp2101.c
drivers/usb/serial/cyberjack.c
drivers/usb/serial/cypress_m8.c
drivers/usb/serial/digi_acceleport.c
drivers/usb/serial/empeg.c
drivers/usb/serial/ftdi_sio.c
drivers/usb/serial/garmin_gps.c
drivers/usb/serial/generic.c
drivers/usb/serial/hp4x.c
drivers/usb/serial/io_tables.h
drivers/usb/serial/io_ti.c
drivers/usb/serial/ipaq.c
drivers/usb/serial/ipw.c
drivers/usb/serial/ir-usb.c
drivers/usb/serial/keyspan.h
drivers/usb/serial/keyspan_pda.c
drivers/usb/serial/kl5kusb105.c
drivers/usb/serial/kobil_sct.c
drivers/usb/serial/mct_u232.c
drivers/usb/serial/omninet.c
drivers/usb/serial/option.c
drivers/usb/serial/pl2303.c
drivers/usb/serial/safe_serial.c
drivers/usb/serial/ti_usb_3410_5052.c
drivers/usb/serial/usb-serial.c
drivers/usb/serial/usb-serial.h
drivers/usb/serial/visor.c
drivers/usb/serial/whiteheat.c

index 926d4c2c16001e0769f76b5b9d5d7f20ed83ac62..104c04385bb9d73d9f71e4fc06f27d8fe29e6870 100644 (file)
@@ -30,7 +30,7 @@ static struct usb_driver airprime_driver = {
        .id_table =     id_table,
 };
 
-static struct usb_serial_device_type airprime_device = {
+static struct usb_serial_driver airprime_device = {
        .owner =                THIS_MODULE,
        .name =                 "airprime",
        .id_table =             id_table,
index abb1b2c543bbe11a7509857599024c8c7fdc3b6a..6d84de40cb7b63a7b83ea0bce26047678452f027 100644 (file)
@@ -121,7 +121,7 @@ static struct usb_driver belkin_driver = {
 };
 
 /* All of the device info needed for the serial converters */
-static struct usb_serial_device_type belkin_device = {
+static struct usb_serial_driver belkin_device = {
        .owner =                THIS_MODULE,
        .name =                 "Belkin / Peracom / GoHubs USB Serial Adapter",
        .short_name =           "belkin",
index 2f612c2d894b4f1d2411355b43545defedd14f85..5a0bcd34bb6df9c77b43fdeb1f0303121543a9a8 100644 (file)
@@ -18,7 +18,7 @@
 
 static int usb_serial_device_match (struct device *dev, struct device_driver *drv)
 {
-       struct usb_serial_device_type *driver;
+       struct usb_serial_driver *driver;
        const struct usb_serial_port *port;
 
        /*
@@ -44,7 +44,7 @@ struct bus_type usb_serial_bus_type = {
 
 static int usb_serial_device_probe (struct device *dev)
 {
-       struct usb_serial_device_type *driver;
+       struct usb_serial_driver *driver;
        struct usb_serial_port *port;
        int retval = 0;
        int minor;
@@ -80,7 +80,7 @@ exit:
 
 static int usb_serial_device_remove (struct device *dev)
 {
-       struct usb_serial_device_type *driver;
+       struct usb_serial_driver *driver;
        struct usb_serial_port *port;
        int retval = 0;
        int minor;
@@ -109,26 +109,26 @@ exit:
        return retval;
 }
 
-int usb_serial_bus_register(struct usb_serial_device_type *device)
+int usb_serial_bus_register(struct usb_serial_driver *driver)
 {
        int retval;
 
-       if (device->short_name)
-               device->driver.name = (char *)device->short_name;
+       if (driver->short_name)
+               driver->driver.name = (char *)driver->short_name;
        else
-               device->driver.name = (char *)device->name;
-       device->driver.bus = &usb_serial_bus_type;
-       device->driver.probe = usb_serial_device_probe;
-       device->driver.remove = usb_serial_device_remove;
-       device->driver.owner = device->owner;
+               driver->driver.name = (char *)driver->name;
+       driver->driver.bus = &usb_serial_bus_type;
+       driver->driver.probe = usb_serial_device_probe;
+       driver->driver.remove = usb_serial_device_remove;
+       driver->driver.owner = driver->owner;
 
-       retval = driver_register(&device->driver);
+       retval = driver_register(&driver->driver);
 
        return retval;
 }
 
-void usb_serial_bus_deregister(struct usb_serial_device_type *device)
+void usb_serial_bus_deregister(struct usb_serial_driver *driver)
 {
-       driver_unregister (&device->driver);
+       driver_unregister(&driver->driver);
 }
 
index 97c78c21e8d1db5a865092d05fbc93df93b959f6..0b45b58bef5fa13d0a28b20af3021992ff5930d1 100644 (file)
@@ -73,7 +73,7 @@ static struct usb_driver cp2101_driver = {
        .id_table       = id_table,
 };
 
-static struct usb_serial_device_type cp2101_device = {
+static struct usb_serial_driver cp2101_device = {
        .owner                  = THIS_MODULE,
        .name                   = "CP2101",
        .id_table               = id_table,
index b5b431067b086bedabcf3f83851b5d55a2c2e214..9f421a3c47e8aec6aa401341a4c21b8b5070da21 100644 (file)
@@ -83,7 +83,7 @@ static struct usb_driver cyberjack_driver = {
        .id_table =     id_table,
 };
 
-static struct usb_serial_device_type cyberjack_device = {
+static struct usb_serial_driver cyberjack_device = {
        .owner =                THIS_MODULE,
        .name =                 "Reiner SCT Cyberjack USB card reader",
        .short_name =           "cyberjack",
index 9ee1aaff2fcdc759a8f0fa28864eb58a5719ddf6..4fb8e59d15275b2fa94fba954e33cb2a3e8b9f91 100644 (file)
@@ -176,7 +176,7 @@ static unsigned int   cypress_buf_put(struct cypress_buf *cb, const char *buf, u
 static unsigned int      cypress_buf_get(struct cypress_buf *cb, char *buf, unsigned int count);
 
 
-static struct usb_serial_device_type cypress_earthmate_device = {
+static struct usb_serial_driver cypress_earthmate_device = {
        .owner =                        THIS_MODULE,
        .name =                         "DeLorme Earthmate USB",
        .short_name =                   "earthmate",
@@ -203,7 +203,7 @@ static struct usb_serial_device_type cypress_earthmate_device = {
        .write_int_callback =           cypress_write_int_callback,
 };
 
-static struct usb_serial_device_type cypress_hidcom_device = {
+static struct usb_serial_driver cypress_hidcom_device = {
        .owner =                        THIS_MODULE,
        .name =                         "HID->COM RS232 Adapter",
        .short_name =                   "cyphidcom",
index a19a47f6cf12a1acee1224218b0eb6d6bc17090b..66feb88b43163c19aec07b9e0f4c8abe4705695d 100644 (file)
@@ -503,7 +503,7 @@ static struct usb_driver digi_driver = {
 
 /* device info needed for the Digi serial converter */
 
-static struct usb_serial_device_type digi_acceleport_2_device = {
+static struct usb_serial_driver digi_acceleport_2_device = {
        .owner =                        THIS_MODULE,
        .name =                         "Digi 2 port USB adapter",
        .short_name =                   "digi_2",
@@ -530,7 +530,7 @@ static struct usb_serial_device_type digi_acceleport_2_device = {
        .shutdown =                     digi_shutdown,
 };
 
-static struct usb_serial_device_type digi_acceleport_4_device = {
+static struct usb_serial_driver digi_acceleport_4_device = {
        .owner =                        THIS_MODULE,
        .name =                         "Digi 4 port USB adapter",
        .short_name =                   "digi_4",
index 8d562ab454a8589335d1d6350b80bfe6b32b0c80..cbea8b38b60ee61c22b221a93db0539e9586978e 100644 (file)
@@ -112,7 +112,7 @@ static struct usb_driver empeg_driver = {
        .id_table =     id_table,
 };
 
-static struct usb_serial_device_type empeg_device = {
+static struct usb_serial_driver empeg_device = {
        .owner =                THIS_MODULE,
        .name =                 "Empeg",
        .id_table =             id_table,
index b713113c16507693852300c11deb888f97490c13..529e1a7ccfa06698fbaf6019de55c1e461f787fd 100644 (file)
@@ -562,7 +562,7 @@ static unsigned short int ftdi_232am_baud_to_divisor (int baud);
 static __u32 ftdi_232bm_baud_base_to_divisor (int baud, int base);
 static __u32 ftdi_232bm_baud_to_divisor (int baud);
 
-static struct usb_serial_device_type ftdi_sio_device = {
+static struct usb_serial_driver ftdi_sio_device = {
        .owner =                THIS_MODULE,
        .name =                 "FTDI USB Serial Device",
        .short_name =           "ftdi_sio",
index 2ef614d5c8f2b313e710fab215bcfad33eda7a08..7361194f1d666f8eba904139842ed2e3e35176d5 100644 (file)
@@ -1468,13 +1468,8 @@ static void garmin_shutdown (struct usb_serial *serial)
 }
 
 
-
-
-
-
-
 /* All of the device info needed */
-static struct usb_serial_device_type garmin_device = {
+static struct usb_serial_driver garmin_device = {
        .owner               = THIS_MODULE,
        .name                = "Garmin GPS usb/tty",
        .short_name          = "garmin_gps",
index 5f7d3193d355e7a3cfe3c6408e9fddc36a37d890..7f567bf96549c11584f5bdfe12c4aa64099b52ff 100644 (file)
@@ -36,7 +36,7 @@ MODULE_PARM_DESC(product, "User specified USB idProduct");
 static struct usb_device_id generic_device_ids[2]; /* Initially all zeroes. */
 
 /* All of the device info needed for the Generic Serial Converter */
-struct usb_serial_device_type usb_serial_generic_device = {
+struct usb_serial_driver usb_serial_generic_device = {
        .owner =                THIS_MODULE,
        .name =                 "Generic",
        .short_name =           "generic",
index 64d55fbd206e22fb790f7c19667c45ea5f11d572..b49469907a87f70a80c0f69005bad7b8b0678fe6 100644 (file)
@@ -44,7 +44,7 @@ static struct usb_driver hp49gp_driver = {
        .id_table =     id_table,
 };
 
-static struct usb_serial_device_type hp49gp_device = {
+static struct usb_serial_driver hp49gp_device = {
        .owner =                THIS_MODULE,
        .name =                 "HP4X",
        .id_table =             id_table,
index e7ffe02408bd760ebf6d766f31131007015ed636..7314c04727fe46f62c6578d0e906ee841ec978d2 100644 (file)
@@ -75,7 +75,7 @@ static struct usb_device_id id_table_combined [] = {
 
 MODULE_DEVICE_TABLE (usb, id_table_combined);
 
-static struct usb_serial_device_type edgeport_2port_device = {
+static struct usb_serial_driver edgeport_2port_device = {
        .owner                  = THIS_MODULE,
        .name                   = "Edgeport 2 port adapter",
        .short_name             = "edgeport_2",
@@ -103,7 +103,7 @@ static struct usb_serial_device_type edgeport_2port_device = {
        .write_bulk_callback    = edge_bulk_out_data_callback,
 };
 
-static struct usb_serial_device_type edgeport_4port_device = {
+static struct usb_serial_driver edgeport_4port_device = {
        .owner                  = THIS_MODULE,
        .name                   = "Edgeport 4 port adapter",
        .short_name             = "edgeport_4",
@@ -131,7 +131,7 @@ static struct usb_serial_device_type edgeport_4port_device = {
        .write_bulk_callback    = edge_bulk_out_data_callback,
 };
 
-static struct usb_serial_device_type edgeport_8port_device = {
+static struct usb_serial_driver edgeport_8port_device = {
        .owner                  = THIS_MODULE,
        .name                   = "Edgeport 8 port adapter",
        .short_name             = "edgeport_8",
index ebf9967f7c86f3e76998e3fb8a3b348a0eeef2c1..4328cc702ef70fafa3c6a49da1adcc710c9db69f 100644 (file)
@@ -2982,7 +2982,7 @@ static unsigned int edge_buf_get(struct edge_buf *eb, char *buf,
 }
 
 
-static struct usb_serial_device_type edgeport_1port_device = {
+static struct usb_serial_driver edgeport_1port_device = {
        .owner                  = THIS_MODULE,
        .name                   = "Edgeport TI 1 port adapter",
        .short_name             = "edgeport_ti_1",
@@ -3010,7 +3010,7 @@ static struct usb_serial_device_type edgeport_1port_device = {
        .write_bulk_callback    = edge_bulk_out_callback,
 };
 
-static struct usb_serial_device_type edgeport_2port_device = {
+static struct usb_serial_driver edgeport_2port_device = {
        .owner                  = THIS_MODULE,
        .name                   = "Edgeport TI 2 port adapter",
        .short_name             = "edgeport_ti_2",
index c05c2a2a0f31ddf31f0bde26cd68c32a59560824..9a79ad8d7a5f0707742a01037e8f92658a0ba9b9 100644 (file)
@@ -547,7 +547,7 @@ static struct usb_driver ipaq_driver = {
 
 
 /* All of the device info needed for the Compaq iPAQ */
-static struct usb_serial_device_type ipaq_device = {
+static struct usb_serial_driver ipaq_device = {
        .owner =                THIS_MODULE,
        .name =                 "PocketPC PDA",
        .id_table =             ipaq_id_table,
index 85e242459c2765449b7bc2ee3e0ec3dc189c4308..04524d34de3b1489c7cdd4df35ba2143131fa865 100644 (file)
@@ -443,7 +443,7 @@ static int ipw_disconnect(struct usb_serial_port *port)
        return 0;
 }
 
-static struct usb_serial_device_type ipw_device = {
+static struct usb_serial_driver ipw_device = {
        .owner =                THIS_MODULE,
        .name =                 "IPWireless converter",
        .short_name =           "ipw",
index 937b2fdd7171ab04a045caac5edffb2775f8e210..ecfb2060ea0ff2ccbdea138a653acf8e85f7b890 100644 (file)
@@ -133,7 +133,7 @@ static struct usb_driver ir_driver = {
 };
 
 
-static struct usb_serial_device_type ir_device = {
+static struct usb_serial_driver ir_device = {
        .owner =                THIS_MODULE,
        .name =                 "IR Dongle",
        .id_table =             id_table,
index e9b45b768aca3a6d35205a35cb8b69b44fd619ca..97e7d9e53e399a687d85277aada3c0601d0f8940 100644 (file)
@@ -570,7 +570,7 @@ static struct usb_device_id keyspan_4port_ids[] = {
 };
 
 /* Structs for the devices, pre and post renumeration. */
-static struct usb_serial_device_type keyspan_pre_device = {
+static struct usb_serial_driver keyspan_pre_device = {
        .owner                  = THIS_MODULE,
        .name                   = "Keyspan - (without firmware)",
        .short_name             = "keyspan_no_firm",
@@ -582,7 +582,7 @@ static struct usb_serial_device_type keyspan_pre_device = {
        .attach                 = keyspan_fake_startup,
 };
 
-static struct usb_serial_device_type keyspan_1port_device = {
+static struct usb_serial_driver keyspan_1port_device = {
        .owner                  = THIS_MODULE,
        .name                   = "Keyspan 1 port adapter",
        .short_name             = "keyspan_1",
@@ -607,7 +607,7 @@ static struct usb_serial_device_type keyspan_1port_device = {
        .shutdown               = keyspan_shutdown,
 };
 
-static struct usb_serial_device_type keyspan_2port_device = {
+static struct usb_serial_driver keyspan_2port_device = {
        .owner                  = THIS_MODULE,
        .name                   = "Keyspan 2 port adapter",
        .short_name             = "keyspan_2",
@@ -632,7 +632,7 @@ static struct usb_serial_device_type keyspan_2port_device = {
        .shutdown               = keyspan_shutdown,
 };
 
-static struct usb_serial_device_type keyspan_4port_device = {
+static struct usb_serial_driver keyspan_4port_device = {
        .owner                  = THIS_MODULE,
        .name                   = "Keyspan 4 port adapter",
        .short_name             = "keyspan_4",
index 635c384cb15a600219d111d5b5eccd3be5695cb0..8fad0e963dd3c0beb3963ef7626d31e428ac712e 100644 (file)
@@ -783,7 +783,7 @@ static void keyspan_pda_shutdown (struct usb_serial *serial)
 }
 
 #ifdef KEYSPAN
-static struct usb_serial_device_type keyspan_pda_fake_device = {
+static struct usb_serial_driver keyspan_pda_fake_device = {
        .owner =                THIS_MODULE,
        .name =                 "Keyspan PDA - (prerenumeration)",
        .short_name =           "keyspan_pda_pre",
@@ -797,7 +797,7 @@ static struct usb_serial_device_type keyspan_pda_fake_device = {
 #endif
 
 #ifdef XIRCOM
-static struct usb_serial_device_type xircom_pgs_fake_device = {
+static struct usb_serial_driver xircom_pgs_fake_device = {
        .owner =                THIS_MODULE,
        .name =                 "Xircom / Entregra PGS - (prerenumeration)",
        .short_name =           "xircom_no_firm",
@@ -810,7 +810,7 @@ static struct usb_serial_device_type xircom_pgs_fake_device = {
 };
 #endif
 
-static struct usb_serial_device_type keyspan_pda_device = {
+static struct usb_serial_driver keyspan_pda_device = {
        .owner =                THIS_MODULE,
        .name =                 "Keyspan PDA",
        .short_name =           "keyspan_pda",
index a11e829e38c8a04e8c90b1d3fa8f262176a4b41e..be082706b95246b67034c846ee8716a78e3fcecd 100644 (file)
@@ -123,7 +123,7 @@ static struct usb_driver kl5kusb105d_driver = {
        .id_table =     id_table,
 };
 
-static struct usb_serial_device_type kl5kusb105d_device = {
+static struct usb_serial_driver kl5kusb105d_device = {
        .owner =             THIS_MODULE,
        .name =              "KL5KUSB105D / PalmConnect",
        .short_name =        "kl5kusb105d",
index fe4c98a7517147717932cf69a0fb88f78141bfa9..94944340bb8d1317554a999c1c46b7042aacb133 100644 (file)
@@ -105,7 +105,7 @@ static struct usb_driver kobil_driver = {
 };
 
 
-static struct usb_serial_device_type kobil_device = {
+static struct usb_serial_driver kobil_device = {
        .owner =                THIS_MODULE,
        .name =                 "KOBIL USB smart card terminal",
        .id_table =             id_table,
index 50b6369647d25b976ea4433658fcf1c74053455d..9470964316a7732945ae65bd817ba837826a3a52 100644 (file)
@@ -132,7 +132,7 @@ static struct usb_driver mct_u232_driver = {
        .id_table =     id_table_combined,
 };
 
-static struct usb_serial_device_type mct_u232_device = {
+static struct usb_serial_driver mct_u232_device = {
        .owner =             THIS_MODULE,
        .name =              "MCT U232",
        .short_name =        "mct_u232",
index 6a99ae192df110d8022d6d8c157d4741808ceaa6..53c0588877c027cc22b0b57a2df00c44655bd483 100644 (file)
@@ -88,7 +88,7 @@ static struct usb_driver omninet_driver = {
 };
 
 
-static struct usb_serial_device_type zyxel_omninet_device = {
+static struct usb_serial_driver zyxel_omninet_device = {
        .owner =                THIS_MODULE,
        .name =                 "ZyXEL - omni.net lcd plus usb",
        .short_name =           "omninet",
index 4989e5740d181141c12fa0d3a456d44f44fbe14c..6ec9266e2e96b6f62c22586c756c2e3e09b9004f 100644 (file)
@@ -105,7 +105,7 @@ static struct usb_driver option_driver = {
 /* The card has three separate interfaces, wich the serial driver
  * recognizes separately, thus num_port=1.
  */
-static struct usb_serial_device_type option_3port_device = {
+static struct usb_serial_driver option_3port_device = {
        .owner             = THIS_MODULE,
        .name              = "Option 3G data card",
        .short_name        = "option",
index 3cf245bdda54d0a877989e5850886562d877c2d9..7134648e078dcc1bdcc6ad316b5f027583916735 100644 (file)
@@ -175,7 +175,7 @@ static unsigned int pl2303_buf_get(struct pl2303_buf *pb, char *buf,
 
 
 /* All of the device info needed for the PL2303 SIO serial converter */
-static struct usb_serial_device_type pl2303_device = {
+static struct usb_serial_driver pl2303_device = {
        .owner =                THIS_MODULE,
        .name =                 "PL-2303",
        .id_table =             id_table,
index 88bf14abfa7ad110ba5cf14382b0d8934284e061..87871bb647dfdd288bcc575b6d4e9476ce085e6a 100644 (file)
@@ -397,7 +397,7 @@ static int safe_startup (struct usb_serial *serial)
        return 0;
 }
 
-static struct usb_serial_device_type safe_device = {
+static struct usb_serial_driver safe_device = {
        .owner =                THIS_MODULE,
        .name =                 "Safe",
        .id_table =             id_table,
index 59c88de3e7ae337459ea7cea7262639fe28d5e5e..f2efaf6f3d768854e2d74cca88f2a7391fb9092d 100644 (file)
@@ -255,7 +255,7 @@ static struct usb_driver ti_usb_driver = {
        .id_table               = ti_id_table_combined,
 };
 
-static struct usb_serial_device_type ti_1port_device = {
+static struct usb_serial_driver ti_1port_device = {
        .owner                  = THIS_MODULE,
        .name                   = "TI USB 3410 1 port adapter",
        .id_table               = ti_id_table_3410,
@@ -282,7 +282,7 @@ static struct usb_serial_device_type ti_1port_device = {
        .write_bulk_callback    = ti_bulk_out_callback,
 };
 
-static struct usb_serial_device_type ti_2port_device = {
+static struct usb_serial_driver ti_2port_device = {
        .owner                  = THIS_MODULE,
        .name                   = "TI USB 5052 2 port adapter",
        .id_table               = ti_id_table_5052,
index e77fbdfc782de8a38d2496ff24b98a0787fa6f19..cf083da15eb435ae3db80574d7d3a448cad24595 100644 (file)
@@ -823,7 +823,7 @@ static void port_release(struct device *dev)
 
 static struct usb_serial * create_serial (struct usb_device *dev, 
                                          struct usb_interface *interface,
-                                         struct usb_serial_device_type *type)
+                                         struct usb_serial_driver *driver)
 {
        struct usb_serial *serial;
 
@@ -834,22 +834,22 @@ static struct usb_serial * create_serial (struct usb_device *dev,
        }
        memset (serial, 0, sizeof(*serial));
        serial->dev = usb_get_dev(dev);
-       serial->type = type;
+       serial->type = driver;
        serial->interface = interface;
        kref_init(&serial->kref);
 
        return serial;
 }
 
-static struct usb_serial_device_type *search_serial_device(struct usb_interface *iface)
+static struct usb_serial_driver *search_serial_device(struct usb_interface *iface)
 {
        struct list_head *p;
        const struct usb_device_id *id;
-       struct usb_serial_device_type *t;
+       struct usb_serial_driver *t;
 
        /* List trough know devices and see if the usb id matches */
        list_for_each(p, &usb_serial_driver_list) {
-               t = list_entry(p, struct usb_serial_device_type, driver_list);
+               t = list_entry(p, struct usb_serial_driver, driver_list);
                id = usb_match_id(iface, t->id_table);
                if (id != NULL) {
                        dbg("descriptor matches");
@@ -872,7 +872,7 @@ int usb_serial_probe(struct usb_interface *interface,
        struct usb_endpoint_descriptor *interrupt_out_endpoint[MAX_NUM_PORTS];
        struct usb_endpoint_descriptor *bulk_in_endpoint[MAX_NUM_PORTS];
        struct usb_endpoint_descriptor *bulk_out_endpoint[MAX_NUM_PORTS];
-       struct usb_serial_device_type *type = NULL;
+       struct usb_serial_driver *type = NULL;
        int retval;
        int minor;
        int buffer_size;
@@ -1375,7 +1375,7 @@ module_exit(usb_serial_exit);
                        }                                               \
        } while (0)
 
-static void fixup_generic(struct usb_serial_device_type *device)
+static void fixup_generic(struct usb_serial_driver *device)
 {
        set_to_generic_if_null(device, open);
        set_to_generic_if_null(device, write);
@@ -1387,28 +1387,28 @@ static void fixup_generic(struct usb_serial_device_type *device)
        set_to_generic_if_null(device, shutdown);
 }
 
-int usb_serial_register(struct usb_serial_device_type *new_device)
+int usb_serial_register(struct usb_serial_driver *driver)
 {
        int retval;
 
-       fixup_generic(new_device);
+       fixup_generic(driver);
 
        /* Add this device to our list of devices */
-       list_add(&new_device->driver_list, &usb_serial_driver_list);
+       list_add(&driver->driver_list, &usb_serial_driver_list);
 
-       retval = usb_serial_bus_register(new_device);
+       retval = usb_serial_bus_register(driver);
        if (retval) {
-               err("problem %d when registering driver %s", retval, new_device->name);
-               list_del(&new_device->driver_list);
+               err("problem %d when registering driver %s", retval, driver->name);
+               list_del(&driver->driver_list);
        }
        else
-               info("USB Serial support registered for %s", new_device->name);
+               info("USB Serial support registered for %s", driver->name);
 
        return retval;
 }
 
 
-void usb_serial_deregister(struct usb_serial_device_type *device)
+void usb_serial_deregister(struct usb_serial_driver *device)
 {
        info("USB Serial deregistering driver %s", device->name);
        list_del(&device->driver_list);
index 57f92f054c75ded3572f5ee9ee0845f69ab317fc..d6738b1b0429f2a7f859836cbe9a6cfb854b975c 100644 (file)
@@ -143,7 +143,7 @@ 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
  * @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_driver for this device
  * @interface: pointer to the struct usb_interface for this device
  * @minor: the starting minor number for this device
  * @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
  */
 struct usb_serial {
        struct usb_device *             dev;
-       struct usb_serial_device_type * type;
+       struct usb_serial_driver *      type;
        struct usb_interface *          interface;
        unsigned char                   minor;
        unsigned char                   num_ports;
@@ -188,11 +188,11 @@ static inline void usb_set_serial_data (struct usb_serial *serial, void *data)
 }
 
 /**
- * usb_serial_device_type - a structure that defines a usb serial device
- * @owner: pointer to the module that owns this device.
- * @name: pointer to a string that describes this device.  This string used
+ * usb_serial_driver - describes a usb serial driver
+ * @owner: pointer to the module that owns this driver.
+ * @name: pointer to a string that describes this driver.  This string used
  *     in the syslog messages when a device is inserted or removed.
- * @short_name: a pointer to a string that describes this device in
+ * @short_name: a pointer to a string that describes this driver in
  *     KOBJ_NAME_LEN characters or less.  This is used for the sysfs interface
  *     to describe the driver.
  * @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)
  * @shutdown: pointer to the driver's shutdown function.  This will be
  *     called when the device is removed from the system.
  *
- * This structure is defines a USB Serial device.  It provides all of
+ * This structure is defines a USB Serial driver.  It provides all of
  * the information that the USB serial core code needs.  If the function
  * pointers are defined, then the USB serial core code will call them when
  * the corresponding tty port functions are called.  If they are not
  * called, the generic serial function will be used instead.
  */
-struct usb_serial_device_type {
+struct usb_serial_driver {
        struct module *owner;
        char    *name;
        char    *short_name;
@@ -269,10 +269,10 @@ struct usb_serial_device_type {
        void (*read_bulk_callback)(struct urb *urb, struct pt_regs *regs);
        void (*write_bulk_callback)(struct urb *urb, struct pt_regs *regs);
 };
-#define to_usb_serial_driver(d) container_of(d, struct usb_serial_device_type, driver)
+#define to_usb_serial_driver(d) container_of(d, struct usb_serial_driver, driver)
 
-extern int  usb_serial_register(struct usb_serial_device_type *new_device);
-extern void usb_serial_deregister(struct usb_serial_device_type *device);
+extern int  usb_serial_register(struct usb_serial_driver *driver);
+extern void usb_serial_deregister(struct usb_serial_driver *driver);
 extern void usb_serial_port_softint(void *private);
 
 extern 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);
 extern int usb_serial_generic_register (int debug);
 extern void usb_serial_generic_deregister (void);
 
-extern int usb_serial_bus_register (struct usb_serial_device_type *device);
-extern void usb_serial_bus_deregister (struct usb_serial_device_type *device);
+extern int usb_serial_bus_register (struct usb_serial_driver *device);
+extern void usb_serial_bus_deregister (struct usb_serial_driver *device);
 
-extern struct usb_serial_device_type usb_serial_generic_device;
+extern struct usb_serial_driver usb_serial_generic_device;
 extern struct bus_type usb_serial_bus_type;
 extern struct tty_driver *usb_serial_tty_driver;
 
index 31c57adcb623c5cbd682216a7cc3b8ea748c28c8..825451b3788ca44927db88653e3883871b7e57dd 100644 (file)
@@ -311,7 +311,7 @@ static struct usb_driver visor_driver = {
 };
 
 /* All of the device info needed for the Handspring Visor, and Palm 4.0 devices */
-static struct usb_serial_device_type handspring_device = {
+static struct usb_serial_driver handspring_device = {
        .owner =                THIS_MODULE,
        .name =                 "Handspring Visor / Palm OS",
        .short_name =           "visor",
@@ -339,7 +339,7 @@ static struct usb_serial_device_type handspring_device = {
 };
 
 /* All of the device info needed for the Clie UX50, TH55 Palm 5.0 devices */
-static struct usb_serial_device_type clie_5_device = {
+static struct usb_serial_driver clie_5_device = {
        .owner =                THIS_MODULE,
        .name =                 "Sony Clie 5.0",
        .short_name =           "clie_5",
@@ -367,7 +367,7 @@ static struct usb_serial_device_type clie_5_device = {
 };
 
 /* device info for the Sony Clie OS version 3.5 */
-static struct usb_serial_device_type clie_3_5_device = {
+static struct usb_serial_driver clie_3_5_device = {
        .owner =                THIS_MODULE,
        .name =                 "Sony Clie 3.5",
        .short_name =           "clie_3.5",
index cf3bc30675a1529068c9ee4e2b6d15a4786fbe31..dc06664bfa0eb9e5749a759d164460b43e249a6d 100644 (file)
@@ -156,7 +156,7 @@ static void whiteheat_unthrottle    (struct usb_serial_port *port);
 static void whiteheat_read_callback    (struct urb *urb, struct pt_regs *regs);
 static void whiteheat_write_callback   (struct urb *urb, struct pt_regs *regs);
 
-static struct usb_serial_device_type whiteheat_fake_device = {
+static struct usb_serial_driver whiteheat_fake_device = {
        .owner =                THIS_MODULE,
        .name =                 "Connect Tech - WhiteHEAT - (prerenumeration)",
        .short_name =           "whiteheatnofirm",
@@ -169,7 +169,7 @@ static struct usb_serial_device_type whiteheat_fake_device = {
        .attach =               whiteheat_firmware_attach,
 };
 
-static struct usb_serial_device_type whiteheat_device = {
+static struct usb_serial_driver whiteheat_device = {
        .owner =                THIS_MODULE,
        .name =                 "Connect Tech - WhiteHEAT",
        .short_name =           "whiteheat",