mirror of https://gitee.com/openkylin/linux.git
USB: EHCI: create sysfs companion files directly in the controller device
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>
This commit is contained in:
parent
109833417c
commit
ed14f0340a
|
@ -391,7 +391,7 @@ static inline void create_companion_file(struct ehci_hcd *ehci)
|
||||||
|
|
||||||
/* with integrated TT there is no companion! */
|
/* with integrated TT there is no companion! */
|
||||||
if (!ehci_is_TDI(ehci))
|
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);
|
&dev_attr_companion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -399,7 +399,7 @@ static inline void remove_companion_file(struct ehci_hcd *ehci)
|
||||||
{
|
{
|
||||||
/* with integrated TT there is no companion! */
|
/* with integrated TT there is no companion! */
|
||||||
if (!ehci_is_TDI(ehci))
|
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);
|
&dev_attr_companion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue