HID: wiimote: convert LEDS to modules
Each of the 4 LEDs may be supported individually by devices. Therefore, we need one module for each device. To avoid code-duplication, we simply pass the LED ID as "arg" argument to the module loading code. This just moves the code over to wiimote-module. The semantics stay the same as before. Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:

committed by
Jiri Kosina

parent
dcf3923138
commit
6c5ae01805
@@ -129,6 +129,10 @@ enum wiimod_module {
|
||||
WIIMOD_KEYS,
|
||||
WIIMOD_RUMBLE,
|
||||
WIIMOD_BATTERY,
|
||||
WIIMOD_LED1,
|
||||
WIIMOD_LED2,
|
||||
WIIMOD_LED3,
|
||||
WIIMOD_LED4,
|
||||
WIIMOD_NUM,
|
||||
WIIMOD_NULL = WIIMOD_NUM,
|
||||
};
|
||||
@@ -185,6 +189,7 @@ enum wiiproto_reqs {
|
||||
|
||||
extern void wiiproto_req_drm(struct wiimote_data *wdata, __u8 drm);
|
||||
extern void wiiproto_req_rumble(struct wiimote_data *wdata, __u8 rumble);
|
||||
extern void wiiproto_req_leds(struct wiimote_data *wdata, int leds);
|
||||
extern void wiiproto_req_status(struct wiimote_data *wdata);
|
||||
extern int wiimote_cmd_write(struct wiimote_data *wdata, __u32 offset,
|
||||
const __u8 *wmem, __u8 size);
|
||||
|
Reference in New Issue
Block a user