diff options
author | Inaky Perez-Gonzalez <inaky@linux.intel.com> | 2008-04-08 16:24:46 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-04-25 00:16:57 -0400 |
commit | b1d8dfb0e548543b1645362e80e1fff522645299 (patch) | |
tree | 5b457242bb6f6d0e94202e6e52dcdbfb83c44711 | |
parent | 3b52f128aeacc4b9e5992012c39ffc9508513bcd (diff) |
wusb: add link wusb-usb device
We need to tie the WUSB and USB devices; the USB stack doesn't need to
know the details about the WUSB device, but needs to have a link to
it. This is needed so that the notify call back for Remove Device can
tie both and undo the device setup (sysfs files).
We connect the devices together at the Add Device notifier callback
(the wusb_dev references the usb_dev and stores it, the usb_dev
references the wusb_dev and stores it); then we do create the WUSB
sysfs files at the usb_dev sysfs directory. At Remove Device, we undo
that (thus we need the usb_dev reference).
Cross reference to functions in the WUSB substack:
wusb_dev_{add,rm}_ncb().
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | include/linux/usb.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index c5af7633c449..c08689ea9b4b 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | struct usb_device; | 24 | struct usb_device; |
25 | struct usb_driver; | 25 | struct usb_driver; |
26 | struct wusb_dev; | ||
26 | 27 | ||
27 | /*-------------------------------------------------------------------------*/ | 28 | /*-------------------------------------------------------------------------*/ |
28 | 29 | ||
@@ -480,6 +481,7 @@ struct usb_device { | |||
480 | unsigned autoresume_disabled:1; | 481 | unsigned autoresume_disabled:1; |
481 | unsigned skip_sys_resume:1; | 482 | unsigned skip_sys_resume:1; |
482 | #endif | 483 | #endif |
484 | struct wusb_dev *wusb_dev; | ||
483 | }; | 485 | }; |
484 | #define to_usb_device(d) container_of(d, struct usb_device, dev) | 486 | #define to_usb_device(d) container_of(d, struct usb_device, dev) |
485 | 487 | ||