[PATCH] USB Storage: make OneTouch PM-aware

The OneTouch subdriver submits its own interrupt URB for notifications
about button presses.  Consequently it needs to know about suspend and
resume events, so it can cancel or restart the URB.

This patch (as593) adds a hook to struct us_data, to be used for
notifying subdrivers about Power Management events, and it implements
the hook in the OneTouch driver.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Nick Sillik <n.sillik@temple.edu>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index 356f471..ca02ae9 100644
--- a/drivers/usb/storage/usb.c
+++ b/drivers/usb/storage/usb.c
@@ -188,6 +188,8 @@
 	down(&us->dev_semaphore);
 
 	US_DEBUGP("%s\n", __FUNCTION__);
+	if (us->suspend_resume_hook)
+		(us->suspend_resume_hook)(us, US_SUSPEND);
 	iface->dev.power.power_state.event = message.event;
 
 	/* When runtime PM is working, we'll set a flag to indicate
@@ -204,6 +206,8 @@
 	down(&us->dev_semaphore);
 
 	US_DEBUGP("%s\n", __FUNCTION__);
+	if (us->suspend_resume_hook)
+		(us->suspend_resume_hook)(us, US_RESUME);
 	iface->dev.power.power_state.event = PM_EVENT_ON;
 
 	up(&us->dev_semaphore);