|
@@ -2237,7 +2237,7 @@ int usb_hcd_get_frame_number (struct usb_device *udev)
|
|
|
|
|
|
int hcd_bus_suspend(struct usb_device *rhdev, pm_message_t msg)
|
|
|
{
|
|
|
- struct usb_hcd *hcd = container_of(rhdev->bus, struct usb_hcd, self);
|
|
|
+ struct usb_hcd *hcd = bus_to_hcd(rhdev->bus);
|
|
|
int status;
|
|
|
int old_state = hcd->state;
|
|
|
|
|
@@ -2286,7 +2286,7 @@ int hcd_bus_suspend(struct usb_device *rhdev, pm_message_t msg)
|
|
|
|
|
|
int hcd_bus_resume(struct usb_device *rhdev, pm_message_t msg)
|
|
|
{
|
|
|
- struct usb_hcd *hcd = container_of(rhdev->bus, struct usb_hcd, self);
|
|
|
+ struct usb_hcd *hcd = bus_to_hcd(rhdev->bus);
|
|
|
int status;
|
|
|
int old_state = hcd->state;
|
|
|
|
|
@@ -2400,7 +2400,7 @@ int usb_bus_start_enum(struct usb_bus *bus, unsigned port_num)
|
|
|
* boards with root hubs hooked up to internal devices (instead of
|
|
|
* just the OTG port) may need more attention to resetting...
|
|
|
*/
|
|
|
- hcd = container_of (bus, struct usb_hcd, self);
|
|
|
+ hcd = bus_to_hcd(bus);
|
|
|
if (port_num && hcd->driver->start_port_reset)
|
|
|
status = hcd->driver->start_port_reset(hcd, port_num);
|
|
|
|