aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/dummy_hcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/dummy_hcd.c')
-rw-r--r--drivers/usb/gadget/dummy_hcd.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
index 503201764f6b..c605aaeed636 100644
--- a/drivers/usb/gadget/dummy_hcd.c
+++ b/drivers/usb/gadget/dummy_hcd.c
@@ -1751,7 +1751,7 @@ static int dummy_hub_control (
1751 return retval; 1751 return retval;
1752} 1752}
1753 1753
1754static int dummy_hub_suspend (struct usb_hcd *hcd) 1754static int dummy_bus_suspend (struct usb_hcd *hcd)
1755{ 1755{
1756 struct dummy *dum = hcd_to_dummy (hcd); 1756 struct dummy *dum = hcd_to_dummy (hcd);
1757 1757
@@ -1762,7 +1762,7 @@ static int dummy_hub_suspend (struct usb_hcd *hcd)
1762 return 0; 1762 return 0;
1763} 1763}
1764 1764
1765static int dummy_hub_resume (struct usb_hcd *hcd) 1765static int dummy_bus_resume (struct usb_hcd *hcd)
1766{ 1766{
1767 struct dummy *dum = hcd_to_dummy (hcd); 1767 struct dummy *dum = hcd_to_dummy (hcd);
1768 1768
@@ -1894,8 +1894,8 @@ static const struct hc_driver dummy_hcd = {
1894 1894
1895 .hub_status_data = dummy_hub_status, 1895 .hub_status_data = dummy_hub_status,
1896 .hub_control = dummy_hub_control, 1896 .hub_control = dummy_hub_control,
1897 .hub_suspend = dummy_hub_suspend, 1897 .bus_suspend = dummy_bus_suspend,
1898 .hub_resume = dummy_hub_resume, 1898 .bus_resume = dummy_bus_resume,
1899}; 1899};
1900 1900
1901static int dummy_hcd_probe (struct device *dev) 1901static int dummy_hcd_probe (struct device *dev)
@@ -1936,13 +1936,6 @@ static int dummy_hcd_suspend (struct device *dev, pm_message_t state)
1936 dev_dbg (dev, "%s\n", __FUNCTION__); 1936 dev_dbg (dev, "%s\n", __FUNCTION__);
1937 hcd = dev_get_drvdata (dev); 1937 hcd = dev_get_drvdata (dev);
1938 1938
1939#ifndef CONFIG_USB_SUSPEND
1940 /* Otherwise this would never happen */
1941 usb_lock_device (hcd->self.root_hub);
1942 dummy_hub_suspend (hcd);
1943 usb_unlock_device (hcd->self.root_hub);
1944#endif
1945
1946 hcd->state = HC_STATE_SUSPENDED; 1939 hcd->state = HC_STATE_SUSPENDED;
1947 return 0; 1940 return 0;
1948} 1941}
@@ -1955,13 +1948,6 @@ static int dummy_hcd_resume (struct device *dev)
1955 hcd = dev_get_drvdata (dev); 1948 hcd = dev_get_drvdata (dev);
1956 hcd->state = HC_STATE_RUNNING; 1949 hcd->state = HC_STATE_RUNNING;
1957 1950
1958#ifndef CONFIG_USB_SUSPEND
1959 /* Otherwise this would never happen */
1960 usb_lock_device (hcd->self.root_hub);
1961 dummy_hub_resume (hcd);
1962 usb_unlock_device (hcd->self.root_hub);
1963#endif
1964
1965 usb_hcd_poll_rh_status (hcd); 1951 usb_hcd_poll_rh_status (hcd);
1966 return 0; 1952 return 0;
1967} 1953}