USB: EHCI: create sysfs companion files directly in the controller device
authorGreg Kroah-Hartman <gregkh@suse.de>
Mon, 27 Apr 2009 20:15:38 +0000 (13:15 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 16 Jun 2009 04:44:43 +0000 (21:44 -0700)
The controller device is where we want this sysfs file, especially as
the dev pointer is about to go away...

Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/ehci-hub.c

index 97a53a48a3d8e24383e5f14cc2590bc36b0408a9..f46ad27c9a90e2cda2e8bbb8b9b45c861af765c5 100644 (file)
@@ -391,7 +391,7 @@ static inline void create_companion_file(struct ehci_hcd *ehci)
 
        /* with integrated TT there is no companion! */
        if (!ehci_is_TDI(ehci))
-               i = device_create_file(ehci_to_hcd(ehci)->self.dev,
+               i = device_create_file(ehci_to_hcd(ehci)->self.controller,
                                       &dev_attr_companion);
 }
 
@@ -399,7 +399,7 @@ static inline void remove_companion_file(struct ehci_hcd *ehci)
 {
        /* with integrated TT there is no companion! */
        if (!ehci_is_TDI(ehci))
-               device_remove_file(ehci_to_hcd(ehci)->self.dev,
+               device_remove_file(ehci_to_hcd(ehci)->self.controller,
                                   &dev_attr_companion);
 }