diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-29 00:08:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-29 00:08:14 -0400 |
commit | 1f419cadff55f548e7356ffebdb9e1b5a8c22275 (patch) | |
tree | 07c04d053322e9913a6b445b2fe00510299e97cf /drivers/usb/gadget/dummy_hcd.c | |
parent | 974f7bc5781d3fc16e32d8908c6e48592e767dd2 (diff) | |
parent | 4303fc6f055cf1a7ec63c3c3fd777b91b7d576f1 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
Diffstat (limited to 'drivers/usb/gadget/dummy_hcd.c')
-rw-r--r-- | drivers/usb/gadget/dummy_hcd.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c index 503201764f6b..02106bebd5c1 100644 --- a/drivers/usb/gadget/dummy_hcd.c +++ b/drivers/usb/gadget/dummy_hcd.c | |||
@@ -967,6 +967,7 @@ static int dummy_udc_resume (struct device *dev) | |||
967 | 967 | ||
968 | static struct device_driver dummy_udc_driver = { | 968 | static struct device_driver dummy_udc_driver = { |
969 | .name = (char *) gadget_name, | 969 | .name = (char *) gadget_name, |
970 | .owner = THIS_MODULE, | ||
970 | .bus = &platform_bus_type, | 971 | .bus = &platform_bus_type, |
971 | .probe = dummy_udc_probe, | 972 | .probe = dummy_udc_probe, |
972 | .remove = dummy_udc_remove, | 973 | .remove = dummy_udc_remove, |
@@ -1751,7 +1752,7 @@ static int dummy_hub_control ( | |||
1751 | return retval; | 1752 | return retval; |
1752 | } | 1753 | } |
1753 | 1754 | ||
1754 | static int dummy_hub_suspend (struct usb_hcd *hcd) | 1755 | static int dummy_bus_suspend (struct usb_hcd *hcd) |
1755 | { | 1756 | { |
1756 | struct dummy *dum = hcd_to_dummy (hcd); | 1757 | struct dummy *dum = hcd_to_dummy (hcd); |
1757 | 1758 | ||
@@ -1762,7 +1763,7 @@ static int dummy_hub_suspend (struct usb_hcd *hcd) | |||
1762 | return 0; | 1763 | return 0; |
1763 | } | 1764 | } |
1764 | 1765 | ||
1765 | static int dummy_hub_resume (struct usb_hcd *hcd) | 1766 | static int dummy_bus_resume (struct usb_hcd *hcd) |
1766 | { | 1767 | { |
1767 | struct dummy *dum = hcd_to_dummy (hcd); | 1768 | struct dummy *dum = hcd_to_dummy (hcd); |
1768 | 1769 | ||
@@ -1894,8 +1895,8 @@ static const struct hc_driver dummy_hcd = { | |||
1894 | 1895 | ||
1895 | .hub_status_data = dummy_hub_status, | 1896 | .hub_status_data = dummy_hub_status, |
1896 | .hub_control = dummy_hub_control, | 1897 | .hub_control = dummy_hub_control, |
1897 | .hub_suspend = dummy_hub_suspend, | 1898 | .bus_suspend = dummy_bus_suspend, |
1898 | .hub_resume = dummy_hub_resume, | 1899 | .bus_resume = dummy_bus_resume, |
1899 | }; | 1900 | }; |
1900 | 1901 | ||
1901 | static int dummy_hcd_probe (struct device *dev) | 1902 | static int dummy_hcd_probe (struct device *dev) |
@@ -1936,13 +1937,6 @@ static int dummy_hcd_suspend (struct device *dev, pm_message_t state) | |||
1936 | dev_dbg (dev, "%s\n", __FUNCTION__); | 1937 | dev_dbg (dev, "%s\n", __FUNCTION__); |
1937 | hcd = dev_get_drvdata (dev); | 1938 | hcd = dev_get_drvdata (dev); |
1938 | 1939 | ||
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; | 1940 | hcd->state = HC_STATE_SUSPENDED; |
1947 | return 0; | 1941 | return 0; |
1948 | } | 1942 | } |
@@ -1955,19 +1949,13 @@ static int dummy_hcd_resume (struct device *dev) | |||
1955 | hcd = dev_get_drvdata (dev); | 1949 | hcd = dev_get_drvdata (dev); |
1956 | hcd->state = HC_STATE_RUNNING; | 1950 | hcd->state = HC_STATE_RUNNING; |
1957 | 1951 | ||
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); | 1952 | usb_hcd_poll_rh_status (hcd); |
1966 | return 0; | 1953 | return 0; |
1967 | } | 1954 | } |
1968 | 1955 | ||
1969 | static struct device_driver dummy_hcd_driver = { | 1956 | static struct device_driver dummy_hcd_driver = { |
1970 | .name = (char *) driver_name, | 1957 | .name = (char *) driver_name, |
1958 | .owner = THIS_MODULE, | ||
1971 | .bus = &platform_bus_type, | 1959 | .bus = &platform_bus_type, |
1972 | .probe = dummy_hcd_probe, | 1960 | .probe = dummy_hcd_probe, |
1973 | .remove = dummy_hcd_remove, | 1961 | .remove = dummy_hcd_remove, |