Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97438
b: refs/heads/master
c: e16362a
h: refs/heads/master
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed May 29, 2008
1 parent 0047570 commit 50f130d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 62d104d0deeabd4148e49eba729d963e740e205f
refs/heads/master: e16362a0c8d90e9adbfe477acbe32b021823fb22
5 changes: 0 additions & 5 deletions trunk/drivers/usb/core/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,6 @@ static int generic_probe(struct usb_device *udev)
{
int err, c;

/* put device-specific files into sysfs */
usb_create_sysfs_dev_files(udev);

/* Choose and set the configuration. This registers the interfaces
* with the driver core and lets interface drivers bind to them.
*/
Expand Down Expand Up @@ -189,8 +186,6 @@ static void generic_disconnect(struct usb_device *udev)
* unconfigure the device */
if (udev->actconfig)
usb_set_configuration(udev, -1);

usb_remove_sysfs_dev_files(udev);
}

#ifdef CONFIG_PM
Expand Down
9 changes: 9 additions & 0 deletions trunk/drivers/usb/core/hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -1326,6 +1326,12 @@ void usb_disconnect(struct usb_device **pdev)

usb_unlock_device(udev);

/* Remove the device-specific files from sysfs. This must be
* done with udev unlocked, because some of the attribute
* routines try to acquire the device lock.
*/
usb_remove_sysfs_dev_files(udev);

/* Unregister the device. The device driver is responsible
* for removing the device files from usbfs and sysfs and for
* de-configuring the device.
Expand Down Expand Up @@ -1541,6 +1547,9 @@ int usb_new_device(struct usb_device *udev)
goto fail;
}

/* put device-specific files into sysfs */
usb_create_sysfs_dev_files(udev);

/* Tell the world! */
announce_device(udev);
return err;
Expand Down

0 comments on commit 50f130d

Please sign in to comment.