summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-07-31 11:24:57 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-08-02 16:43:43 -0300
commit34abf2194499571b2efa6b4aface8c0ea0c47ce1 (patch)
treee2698d258ad65a7878fbc4b6c9e3de81228fb3ef /drivers/media/dvb/dvb-usb/dvb-usb-remote.c
parent0172fea3c0cf55b61bc94738db3ece513264774c (diff)
downloadop-kernel-dev-34abf2194499571b2efa6b4aface8c0ea0c47ce1.zip
op-kernel-dev-34abf2194499571b2efa6b4aface8c0ea0c47ce1.tar.gz
V4L/DVB: dvb-usb: get rid of struct dvb_usb_rc_key
dvb-usb has its own IR handle code. Now that we have a Remote Controller subsystem, we should start using it. So, remove this struct, in favor of the similar struct defined at the RC subsystem. This is a big, but trivial patch. It is a 3 line delect, plus lots of rename on several dvb-usb files. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/dvb-usb-remote.c')
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb-remote.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-remote.c b/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
index 852fe89..e210f2f 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
@@ -13,13 +13,13 @@ static int dvb_usb_getkeycode(struct input_dev *dev,
{
struct dvb_usb_device *d = input_get_drvdata(dev);
- struct dvb_usb_rc_key *keymap = d->props.rc_key_map;
+ struct ir_scancode *keymap = d->props.rc_key_map;
int i;
/* See if we can match the raw key code. */
for (i = 0; i < d->props.rc_key_map_size; i++)
- if (keymap[i].scan == scancode) {
- *keycode = keymap[i].event;
+ if (keymap[i].scancode == scancode) {
+ *keycode = keymap[i].keycode;
return 0;
}
@@ -29,8 +29,8 @@ static int dvb_usb_getkeycode(struct input_dev *dev,
* to work
*/
for (i = 0; i < d->props.rc_key_map_size; i++)
- if (keymap[i].event == KEY_RESERVED ||
- keymap[i].event == KEY_UNKNOWN) {
+ if (keymap[i].keycode == KEY_RESERVED ||
+ keymap[i].keycode == KEY_UNKNOWN) {
*keycode = KEY_RESERVED;
return 0;
}
@@ -43,22 +43,22 @@ static int dvb_usb_setkeycode(struct input_dev *dev,
{
struct dvb_usb_device *d = input_get_drvdata(dev);
- struct dvb_usb_rc_key *keymap = d->props.rc_key_map;
+ struct ir_scancode *keymap = d->props.rc_key_map;
int i;
/* Search if it is replacing an existing keycode */
for (i = 0; i < d->props.rc_key_map_size; i++)
- if (keymap[i].scan == scancode) {
- keymap[i].event = keycode;
+ if (keymap[i].scancode == scancode) {
+ keymap[i].keycode = keycode;
return 0;
}
/* Search if is there a clean entry. If so, use it */
for (i = 0; i < d->props.rc_key_map_size; i++)
- if (keymap[i].event == KEY_RESERVED ||
- keymap[i].event == KEY_UNKNOWN) {
- keymap[i].scan = scancode;
- keymap[i].event = keycode;
+ if (keymap[i].keycode == KEY_RESERVED ||
+ keymap[i].keycode == KEY_UNKNOWN) {
+ keymap[i].scancode = scancode;
+ keymap[i].keycode = keycode;
return 0;
}
@@ -184,8 +184,8 @@ int dvb_usb_remote_init(struct dvb_usb_device *d)
deb_rc("key map size: %d\n", d->props.rc_key_map_size);
for (i = 0; i < d->props.rc_key_map_size; i++) {
deb_rc("setting bit for event %d item %d\n",
- d->props.rc_key_map[i].event, i);
- set_bit(d->props.rc_key_map[i].event, input_dev->keybit);
+ d->props.rc_key_map[i].keycode, i);
+ set_bit(d->props.rc_key_map[i].keycode, input_dev->keybit);
}
/* Start the remote-control polling. */
@@ -234,7 +234,7 @@ int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *d,
u8 keybuf[5], u32 *event, int *state)
{
int i;
- struct dvb_usb_rc_key *keymap = d->props.rc_key_map;
+ struct ir_scancode *keymap = d->props.rc_key_map;
*event = 0;
*state = REMOTE_NO_KEY_PRESSED;
switch (keybuf[0]) {
@@ -250,7 +250,7 @@ int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *d,
for (i = 0; i < d->props.rc_key_map_size; i++)
if (rc5_custom(&keymap[i]) == keybuf[1] &&
rc5_data(&keymap[i]) == keybuf[3]) {
- *event = keymap[i].event;
+ *event = keymap[i].keycode;
*state = REMOTE_KEY_PRESSED;
return 0;
}
OpenPOWER on IntegriCloud