aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/core/driver.c8
-rw-r--r--drivers/usb/serial/keyspan.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index c51f8e9312e0..7c3aaa9c5402 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -91,8 +91,8 @@ static int usb_create_newid_file(struct usb_driver *usb_drv)
91 goto exit; 91 goto exit;
92 92
93 if (usb_drv->probe != NULL) 93 if (usb_drv->probe != NULL)
94 error = sysfs_create_file(&usb_drv->drvwrap.driver.kobj, 94 error = driver_create_file(&usb_drv->drvwrap.driver,
95 &driver_attr_new_id.attr); 95 &driver_attr_new_id);
96exit: 96exit:
97 return error; 97 return error;
98} 98}
@@ -103,8 +103,8 @@ static void usb_remove_newid_file(struct usb_driver *usb_drv)
103 return; 103 return;
104 104
105 if (usb_drv->probe != NULL) 105 if (usb_drv->probe != NULL)
106 sysfs_remove_file(&usb_drv->drvwrap.driver.kobj, 106 driver_remove_file(&usb_drv->drvwrap.driver,
107 &driver_attr_new_id.attr); 107 &driver_attr_new_id);
108} 108}
109 109
110static void usb_free_dynids(struct usb_driver *usb_drv) 110static void usb_free_dynids(struct usb_driver *usb_drv)
diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c
index feba9679ace8..7c069a02c1dd 100644
--- a/drivers/usb/serial/keyspan.c
+++ b/drivers/usb/serial/keyspan.c
@@ -447,7 +447,7 @@ static void usa26_indat_callback(struct urb *urb)
447 447
448 port = (struct usb_serial_port *) urb->context; 448 port = (struct usb_serial_port *) urb->context;
449 tty = port->tty; 449 tty = port->tty;
450 if (urb->actual_length) { 450 if (tty && urb->actual_length) {
451 /* 0x80 bit is error flag */ 451 /* 0x80 bit is error flag */
452 if ((data[0] & 0x80) == 0) { 452 if ((data[0] & 0x80) == 0) {
453 /* no errors on individual bytes, only possible overrun err*/ 453 /* no errors on individual bytes, only possible overrun err*/