diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-07-31 18:04:09 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-02 16:43:45 -0300 |
commit | f72a27b8ed4458bb9f7203408441d27382bc93f4 (patch) | |
tree | 667c20a22af36fecdfb770384afb3ef85a9578e2 /drivers/media/dvb/dvb-usb/digitv.c | |
parent | 34abf2194499571b2efa6b4aface8c0ea0c47ce1 (diff) |
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/digitv.c')
-rw-r--r-- | drivers/media/dvb/dvb-usb/digitv.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/media/dvb/dvb-usb/digitv.c b/drivers/media/dvb/dvb-usb/digitv.c index 73f14a24ffa..13d006bb19d 100644 --- a/drivers/media/dvb/dvb-usb/digitv.c +++ b/drivers/media/dvb/dvb-usb/digitv.c @@ -237,10 +237,10 @@ static int digitv_rc_query(struct dvb_usb_device *d, u32 *event, int *state) /* if something is inside the buffer, simulate key press */ if (key[1] != 0) { - for (i = 0; i < d->props.rc_key_map_size; i++) { - if (rc5_custom(&d->props.rc_key_map[i]) == key[1] && - rc5_data(&d->props.rc_key_map[i]) == key[2]) { - *event = d->props.rc_key_map[i].keycode; + for (i = 0; i < d->props.rc.legacy.rc_key_map_size; i++) { + if (rc5_custom(&d->props.rc.legacy.rc_key_map[i]) == key[1] && + rc5_data(&d->props.rc.legacy.rc_key_map[i]) == key[2]) { + *event = d->props.rc.legacy.rc_key_map[i].keycode; *state = REMOTE_KEY_PRESSED; return 0; } @@ -310,10 +310,12 @@ static struct dvb_usb_device_properties digitv_properties = { }, .identify_state = digitv_identify_state, - .rc_interval = 1000, - .rc_key_map = ir_codes_digitv_table, - .rc_key_map_size = ARRAY_SIZE(ir_codes_digitv_table), - .rc_query = digitv_rc_query, + .rc.legacy = { + .rc_interval = 1000, + .rc_key_map = ir_codes_digitv_table, + .rc_key_map_size = ARRAY_SIZE(ir_codes_digitv_table), + .rc_query = digitv_rc_query, + }, .i2c_algo = &digitv_i2c_algo, |