diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-01 01:04:09 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-02 23:43:45 +0400 |
commit | f72a27b8ed4458bb9f7203408441d27382bc93f4 (patch) | |
tree | 667c20a22af36fecdfb770384afb3ef85a9578e2 /drivers/media/dvb/dvb-usb/anysee.c | |
parent | 34abf2194499571b2efa6b4aface8c0ea0c47ce1 (diff) | |
download | linux-f72a27b8ed4458bb9f7203408441d27382bc93f4.tar.xz |
V4L/DVB: dvb-usb: prepare drivers for using rc-core
This is a big patch, yet trivial. It just move the RC properties
to a separate struct, in order to prepare the dvb-usb drivers to
use rc-core. There's no change on the behavior of the drivers.
With this change, it is possible to have both legacy and rc-core
based code inside the dvb-usb-remote, allowing a gradual migration
to rc-core, driver per driver.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/anysee.c')
-rw-r--r-- | drivers/media/dvb/dvb-usb/anysee.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/media/dvb/dvb-usb/anysee.c b/drivers/media/dvb/dvb-usb/anysee.c index 3e39e8ff7e8f..4685259e1614 100644 --- a/drivers/media/dvb/dvb-usb/anysee.c +++ b/drivers/media/dvb/dvb-usb/anysee.c @@ -377,7 +377,7 @@ static int anysee_tuner_attach(struct dvb_usb_adapter *adap) static int anysee_rc_query(struct dvb_usb_device *d, u32 *event, int *state) { u8 buf[] = {CMD_GET_IR_CODE}; - struct ir_scancode *keymap = d->props.rc_key_map; + struct ir_scancode *keymap = d->props.rc.legacy.rc_key_map; u8 ircode[2]; int i, ret; @@ -388,7 +388,7 @@ static int anysee_rc_query(struct dvb_usb_device *d, u32 *event, int *state) *event = 0; *state = REMOTE_NO_KEY_PRESSED; - for (i = 0; i < d->props.rc_key_map_size; i++) { + for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) { if (rc5_custom(&keymap[i]) == ircode[0] && rc5_data(&keymap[i]) == ircode[1]) { *event = keymap[i].keycode; @@ -520,10 +520,12 @@ static struct dvb_usb_device_properties anysee_properties = { } }, - .rc_key_map = ir_codes_anysee_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_anysee_table), - .rc_query = anysee_rc_query, - .rc_interval = 200, /* windows driver uses 500ms */ + .rc.legacy = { + .rc_key_map = ir_codes_anysee_table, + .rc_key_map_size = ARRAY_SIZE(ir_codes_anysee_table), + .rc_query = anysee_rc_query, + .rc_interval = 200, /* windows driver uses 500ms */ + }, .i2c_algo = &anysee_i2c_algo, |