This source file includes following definitions.
- wusbhc_channel_changed
- wusbhc_pal_register
- wusbhc_pal_unregister
1
2
3
4
5
6
7
8 #include "wusbhc.h"
9
10 static void wusbhc_channel_changed(struct uwb_pal *pal, int channel)
11 {
12 struct wusbhc *wusbhc = container_of(pal, struct wusbhc, pal);
13
14 dev_dbg(wusbhc->dev, "%s: channel = %d\n", __func__, channel);
15 if (channel < 0)
16 wusbhc_stop(wusbhc);
17 else
18 wusbhc_start(wusbhc);
19 }
20
21
22
23
24
25 int wusbhc_pal_register(struct wusbhc *wusbhc)
26 {
27 uwb_pal_init(&wusbhc->pal);
28
29 wusbhc->pal.name = "wusbhc";
30 wusbhc->pal.device = wusbhc->usb_hcd.self.controller;
31 wusbhc->pal.rc = wusbhc->uwb_rc;
32 wusbhc->pal.channel_changed = wusbhc_channel_changed;
33
34 return uwb_pal_register(&wusbhc->pal);
35 }
36
37
38
39
40
41 void wusbhc_pal_unregister(struct wusbhc *wusbhc)
42 {
43 if (wusbhc->uwb_rc)
44 uwb_pal_unregister(&wusbhc->pal);
45 }