[PATCH] usb suspend updates (interface suspend)
This is the first of a few installments of PM API updates to match the recent switch to "pm_message_t". This installment primarily affects USB device drivers (for USB interfaces), and it changes the handful of drivers which currently implement suspend methods: - <linux/usb.h> and usbcore, signature change - Some drivers only changed the signature, net effect this just shuts up "sparse -Wbitwise": * hid-core * stir4200 - Two network drivers did that, and also grew slightly more featureful suspend code ... they now properly shut down their activities. (As should stir4200...) * pegasus * usbnet Note that the Wake-On-Lan (WOL) support in pegasus doesn't yet work; looks to me like it's missing a request to turn it on, vs just configuring it. The ASIX code in usbnet also has WOL hooks that are ready to use; untested. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Index: gregkh-2.6/drivers/net/irda/stir4200.c ===================================================================
This commit is contained in:
@@ -1382,13 +1382,13 @@ void usb_buffer_unmap_sg (struct usb_device *dev, unsigned pipe,
|
||||
usb_pipein (pipe) ? DMA_FROM_DEVICE : DMA_TO_DEVICE);
|
||||
}
|
||||
|
||||
static int usb_generic_suspend(struct device *dev, u32 state)
|
||||
static int usb_generic_suspend(struct device *dev, pm_message_t message)
|
||||
{
|
||||
struct usb_interface *intf;
|
||||
struct usb_driver *driver;
|
||||
|
||||
if (dev->driver == &usb_generic_driver)
|
||||
return usb_suspend_device (to_usb_device(dev), state);
|
||||
return usb_suspend_device (to_usb_device(dev), message);
|
||||
|
||||
if ((dev->driver == NULL) ||
|
||||
(dev->driver_data == &usb_generic_driver_data))
|
||||
@@ -1402,7 +1402,7 @@ static int usb_generic_suspend(struct device *dev, u32 state)
|
||||
return 0;
|
||||
|
||||
if (driver->suspend)
|
||||
return driver->suspend(intf, state);
|
||||
return driver->suspend(intf, message);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user