[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:
David Brownell
2005-04-18 17:39:22 -07:00
committed by Greg K-H
parent c6053ecffb
commit 27d72e8572
7 changed files with 42 additions and 14 deletions

View File

@ -1790,12 +1790,12 @@ static int hid_probe(struct usb_interface *intf, const struct usb_device_id *id)
return 0;
}
static int hid_suspend(struct usb_interface *intf, u32 state)
static int hid_suspend(struct usb_interface *intf, pm_message_t message)
{
struct hid_device *hid = usb_get_intfdata (intf);
usb_kill_urb(hid->urbin);
intf->dev.power.power_state = state;
intf->dev.power.power_state = PMSG_SUSPEND;
dev_dbg(&intf->dev, "suspend\n");
return 0;
}
@ -1805,7 +1805,7 @@ static int hid_resume(struct usb_interface *intf)
struct hid_device *hid = usb_get_intfdata (intf);
int status;
intf->dev.power.power_state = PM_SUSPEND_ON;
intf->dev.power.power_state = PMSG_ON;
if (hid->open)
status = usb_submit_urb(hid->urbin, GFP_NOIO);
else