diff options
author | Matthew Dharm <mdharm-usb@one-eyed-alien.net> | 2005-12-05 06:56:51 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-01-04 22:51:41 +0100 |
commit | 7931e1c6f8007d5fef8a0bb2dc71bd97315eeae9 (patch) | |
tree | aa4ace5efa3454324b10f0b4036fc87a3e815bcf /drivers/usb/storage/usb.h | |
parent | [PATCH] USB: Let usbmon collect less garbage (diff) | |
download | linux-7931e1c6f8007d5fef8a0bb2dc71bd97315eeae9.tar.xz linux-7931e1c6f8007d5fef8a0bb2dc71bd97315eeae9.zip |
[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>
Diffstat (limited to 'drivers/usb/storage/usb.h')
-rw-r--r-- | drivers/usb/storage/usb.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/usb/storage/usb.h b/drivers/usb/storage/usb.h index 0cd1eebc4497..7259fd1f6b0d 100644 --- a/drivers/usb/storage/usb.h +++ b/drivers/usb/storage/usb.h @@ -93,7 +93,11 @@ struct us_unusual_dev { typedef int (*trans_cmnd)(struct scsi_cmnd *, struct us_data*); typedef int (*trans_reset)(struct us_data*); typedef void (*proto_cmnd)(struct scsi_cmnd*, struct us_data*); -typedef void (*extra_data_destructor)(void *); /* extra data destructor */ +typedef void (*extra_data_destructor)(void *); /* extra data destructor */ +typedef void (*pm_hook)(struct us_data *, int); /* power management hook */ + +#define US_SUSPEND 0 +#define US_RESUME 1 /* we allocate one of these for every device that we remember */ struct us_data { @@ -149,6 +153,9 @@ struct us_data { /* subdriver information */ void *extra; /* Any extra data */ extra_data_destructor extra_destructor;/* extra data destructor */ +#ifdef CONFIG_PM + pm_hook suspend_resume_hook; +#endif }; /* Convert between us_data and the corresponding Scsi_Host */ |