aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/usb.h
diff options
context:
space:
mode:
authorMatthew Dharm <mdharm-usb@one-eyed-alien.net>2005-12-05 00:56:51 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-04 16:51:41 -0500
commit7931e1c6f8007d5fef8a0bb2dc71bd97315eeae9 (patch)
treeaa4ace5efa3454324b10f0b4036fc87a3e815bcf /drivers/usb/storage/usb.h
parentb9b09422570e5e35a9f590a1ead63e711aefac8c (diff)
[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.h9
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 {
93typedef int (*trans_cmnd)(struct scsi_cmnd *, struct us_data*); 93typedef int (*trans_cmnd)(struct scsi_cmnd *, struct us_data*);
94typedef int (*trans_reset)(struct us_data*); 94typedef int (*trans_reset)(struct us_data*);
95typedef void (*proto_cmnd)(struct scsi_cmnd*, struct us_data*); 95typedef void (*proto_cmnd)(struct scsi_cmnd*, struct us_data*);
96typedef void (*extra_data_destructor)(void *); /* extra data destructor */ 96typedef void (*extra_data_destructor)(void *); /* extra data destructor */
97typedef void (*pm_hook)(struct us_data *, int); /* power management hook */
98
99#define US_SUSPEND 0
100#define US_RESUME 1
97 101
98/* we allocate one of these for every device that we remember */ 102/* we allocate one of these for every device that we remember */
99struct us_data { 103struct us_data {
@@ -149,6 +153,9 @@ struct us_data {
149 /* subdriver information */ 153 /* subdriver information */
150 void *extra; /* Any extra data */ 154 void *extra; /* Any extra data */
151 extra_data_destructor extra_destructor;/* extra data destructor */ 155 extra_data_destructor extra_destructor;/* extra data destructor */
156#ifdef CONFIG_PM
157 pm_hook suspend_resume_hook;
158#endif
152}; 159};
153 160
154/* Convert between us_data and the corresponding Scsi_Host */ 161/* Convert between us_data and the corresponding Scsi_Host */