]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
wusb: add link wusb-usb device
authorInaky Perez-Gonzalez <inaky@linux.intel.com>
Tue, 8 Apr 2008 20:24:46 +0000 (13:24 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 25 Apr 2008 04:16:57 +0000 (21:16 -0700)
commitb1d8dfb0e548543b1645362e80e1fff522645299
tree5b457242bb6f6d0e94202e6e52dcdbfb83c44711
parent3b52f128aeacc4b9e5992012c39ffc9508513bcd
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>
include/linux/usb.h