diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-07-22 17:12:37 +1000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-07-22 17:12:37 +1000 |
commit | 8725f25acc656c1522d48a6746055099efdaca4c (patch) | |
tree | e241424fa58178ed6c2a95a4eb931ea83dbea33c /drivers/usb/core/file.c | |
parent | c69cccc95fe4b90dde5fe33e6a3b77880b534fa4 (diff) | |
parent | 93ded9b8fd42abe2c3607097963d8de6ad9117eb (diff) |
Merge commit 'origin/master'
Manually fixed up:
drivers/net/fs_enet/fs_enet-main.c
Diffstat (limited to 'drivers/usb/core/file.c')
-rw-r--r-- | drivers/usb/core/file.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/core/file.c b/drivers/usb/core/file.c index c6a95395e52a..913fb8667899 100644 --- a/drivers/usb/core/file.c +++ b/drivers/usb/core/file.c @@ -150,7 +150,7 @@ int usb_register_dev(struct usb_interface *intf, int retval = -EINVAL; int minor_base = class_driver->minor_base; int minor = 0; - char name[BUS_ID_SIZE]; + char name[20]; char *temp; #ifdef CONFIG_USB_DYNAMIC_MINORS @@ -190,9 +190,9 @@ int usb_register_dev(struct usb_interface *intf, intf->minor = minor; /* create a usb class device for this usb interface */ - snprintf(name, BUS_ID_SIZE, class_driver->name, minor - minor_base); + snprintf(name, sizeof(name), class_driver->name, minor - minor_base); temp = strrchr(name, '/'); - if (temp && (temp[1] != 0x00)) + if (temp && (temp[1] != '\0')) ++temp; else temp = name; @@ -227,7 +227,7 @@ void usb_deregister_dev(struct usb_interface *intf, struct usb_class_driver *class_driver) { int minor_base = class_driver->minor_base; - char name[BUS_ID_SIZE]; + char name[20]; #ifdef CONFIG_USB_DYNAMIC_MINORS minor_base = 0; @@ -242,7 +242,7 @@ void usb_deregister_dev(struct usb_interface *intf, usb_minors[intf->minor] = NULL; up_write(&minor_rwsem); - snprintf(name, BUS_ID_SIZE, class_driver->name, intf->minor - minor_base); + snprintf(name, sizeof(name), class_driver->name, intf->minor - minor_base); device_destroy(usb_class->class, MKDEV(USB_MAJOR, intf->minor)); intf->usb_dev = NULL; intf->minor = -1; |