diff options
Diffstat (limited to 'drivers/usb/wusbcore/pal.c')
-rw-r--r-- | drivers/usb/wusbcore/pal.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/usb/wusbcore/pal.c b/drivers/usb/wusbcore/pal.c index 7cc51e9905c..d0b172c5ecc 100644 --- a/drivers/usb/wusbcore/pal.c +++ b/drivers/usb/wusbcore/pal.c | |||
@@ -18,6 +18,16 @@ | |||
18 | */ | 18 | */ |
19 | #include "wusbhc.h" | 19 | #include "wusbhc.h" |
20 | 20 | ||
21 | static void wusbhc_channel_changed(struct uwb_pal *pal, int channel) | ||
22 | { | ||
23 | struct wusbhc *wusbhc = container_of(pal, struct wusbhc, pal); | ||
24 | |||
25 | if (channel < 0) | ||
26 | wusbhc_stop(wusbhc); | ||
27 | else | ||
28 | wusbhc_start(wusbhc); | ||
29 | } | ||
30 | |||
21 | /** | 31 | /** |
22 | * wusbhc_pal_register - register the WUSB HC as a UWB PAL | 32 | * wusbhc_pal_register - register the WUSB HC as a UWB PAL |
23 | * @wusbhc: the WUSB HC | 33 | * @wusbhc: the WUSB HC |
@@ -28,8 +38,10 @@ int wusbhc_pal_register(struct wusbhc *wusbhc) | |||
28 | 38 | ||
29 | wusbhc->pal.name = "wusbhc"; | 39 | wusbhc->pal.name = "wusbhc"; |
30 | wusbhc->pal.device = wusbhc->usb_hcd.self.controller; | 40 | wusbhc->pal.device = wusbhc->usb_hcd.self.controller; |
41 | wusbhc->pal.rc = wusbhc->uwb_rc; | ||
42 | wusbhc->pal.channel_changed = wusbhc_channel_changed; | ||
31 | 43 | ||
32 | return uwb_pal_register(wusbhc->uwb_rc, &wusbhc->pal); | 44 | return uwb_pal_register(&wusbhc->pal); |
33 | } | 45 | } |
34 | 46 | ||
35 | /** | 47 | /** |
@@ -38,5 +50,5 @@ int wusbhc_pal_register(struct wusbhc *wusbhc) | |||
38 | */ | 50 | */ |
39 | void wusbhc_pal_unregister(struct wusbhc *wusbhc) | 51 | void wusbhc_pal_unregister(struct wusbhc *wusbhc) |
40 | { | 52 | { |
41 | uwb_pal_unregister(wusbhc->uwb_rc, &wusbhc->pal); | 53 | uwb_pal_unregister(&wusbhc->pal); |
42 | } | 54 | } |