]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/serial/cypress_m8.c
Don't touch USB controller IO registers when they are disabled
[linux-2.6-omap-h63xx.git] / drivers / usb / serial / cypress_m8.c
index 05c44ae3ed32adce07adbfb0a3d05edfdc5c1979..af9290ed257bc17b3a5f1762ee1bd0411acb8745 100644 (file)
@@ -176,10 +176,12 @@ 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 = {
-       .owner =                        THIS_MODULE,
-       .name =                         "DeLorme Earthmate USB",
-       .short_name =                   "earthmate",
+static struct usb_serial_driver cypress_earthmate_device = {
+       .driver = {
+               .owner =                THIS_MODULE,
+               .name =                 "earthmate",
+       },
+       .description =                  "DeLorme Earthmate USB",
        .id_table =                     id_table_earthmate,
        .num_interrupt_in =             1,
        .num_interrupt_out =            1,
@@ -203,10 +205,12 @@ 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 = {
-       .owner =                        THIS_MODULE,
-       .name =                         "HID->COM RS232 Adapter",
-       .short_name =                   "cyphidcom",
+static struct usb_serial_driver cypress_hidcom_device = {
+       .driver = {
+               .owner =                THIS_MODULE,
+               .name =                 "cyphidcom",
+       },
+       .description =                  "HID->COM RS232 Adapter",
        .id_table =                     id_table_cyphidcomrs232,
        .num_interrupt_in =             1,
        .num_interrupt_out =            1,
@@ -610,8 +614,7 @@ static void cypress_close(struct usb_serial_port *port, struct file * filp)
                timeout = max((HZ*2560)/bps,HZ/10);
        else
                timeout = 2*HZ;
-       set_current_state(TASK_INTERRUPTIBLE);
-       schedule_timeout(timeout);
+       schedule_timeout_interruptible(timeout);
 
        dbg("%s - stopping urbs", __FUNCTION__);
        usb_kill_urb (port->interrupt_in_urb);