aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/u132-hcd.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2008-04-03 18:03:06 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-25 00:16:48 -0400
commit7be7d7418776a41badce7ca00246e270d408e4b9 (patch)
tree8d3de8a987f917ceb347b9e4c9e14eebbf6b8f61 /drivers/usb/host/u132-hcd.c
parent7329e211b987a493cbcfca0e98c60eb108ab42df (diff)
USB: clarify usage of hcd->suspend/resume methods
The .suspend and .resume method pointers in struct usb_hcd have not been fully understood by host-controller driver writers. They are meant for use with PCI controllers; other platform-specific drivers generally should not refer to them. To try and clarify matters, this patch (as1065) renames those methods to .pci_suspend and .pci_resume. It eliminates corresponding dead code and bogus references in the ohci-ssb and u132-hcd drivers. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/u132-hcd.c')
-rw-r--r--drivers/usb/host/u132-hcd.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/drivers/usb/host/u132-hcd.c b/drivers/usb/host/u132-hcd.c
index 4616a880d89c..9b6323f768b2 100644
--- a/drivers/usb/host/u132-hcd.c
+++ b/drivers/usb/host/u132-hcd.c
@@ -2946,34 +2946,6 @@ static void u132_hub_irq_enable(struct usb_hcd *hcd)
2946 2946
2947 2947
2948#ifdef CONFIG_PM 2948#ifdef CONFIG_PM
2949static int u132_hcd_suspend(struct usb_hcd *hcd, pm_message_t message)
2950{
2951 struct u132 *u132 = hcd_to_u132(hcd);
2952 if (u132->going > 1) {
2953 dev_err(&u132->platform_dev->dev, "device has been removed %d\n"
2954 , u132->going);
2955 return -ENODEV;
2956 } else if (u132->going > 0) {
2957 dev_err(&u132->platform_dev->dev, "device is being removed\n");
2958 return -ESHUTDOWN;
2959 } else
2960 return 0;
2961}
2962
2963static int u132_hcd_resume(struct usb_hcd *hcd)
2964{
2965 struct u132 *u132 = hcd_to_u132(hcd);
2966 if (u132->going > 1) {
2967 dev_err(&u132->platform_dev->dev, "device has been removed %d\n"
2968 , u132->going);
2969 return -ENODEV;
2970 } else if (u132->going > 0) {
2971 dev_err(&u132->platform_dev->dev, "device is being removed\n");
2972 return -ESHUTDOWN;
2973 } else
2974 return 0;
2975}
2976
2977static int u132_bus_suspend(struct usb_hcd *hcd) 2949static int u132_bus_suspend(struct usb_hcd *hcd)
2978{ 2950{
2979 struct u132 *u132 = hcd_to_u132(hcd); 2951 struct u132 *u132 = hcd_to_u132(hcd);
@@ -3003,8 +2975,6 @@ static int u132_bus_resume(struct usb_hcd *hcd)
3003} 2975}
3004 2976
3005#else 2977#else
3006#define u132_hcd_suspend NULL
3007#define u132_hcd_resume NULL
3008#define u132_bus_suspend NULL 2978#define u132_bus_suspend NULL
3009#define u132_bus_resume NULL 2979#define u132_bus_resume NULL
3010#endif 2980#endif
@@ -3015,8 +2985,6 @@ static struct hc_driver u132_hc_driver = {
3015 .flags = HCD_USB11 | HCD_MEMORY, 2985 .flags = HCD_USB11 | HCD_MEMORY,
3016 .reset = u132_hcd_reset, 2986 .reset = u132_hcd_reset,
3017 .start = u132_hcd_start, 2987 .start = u132_hcd_start,
3018 .suspend = u132_hcd_suspend,
3019 .resume = u132_hcd_resume,
3020 .stop = u132_hcd_stop, 2988 .stop = u132_hcd_stop,
3021 .urb_enqueue = u132_urb_enqueue, 2989 .urb_enqueue = u132_urb_enqueue,
3022 .urb_dequeue = u132_urb_dequeue, 2990 .urb_dequeue = u132_urb_dequeue,