summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/dvb-usb/digitv.c
diff options
context:
space:
mode:
authorPatrick Boettcher <devnull@localhost>2005-04-29 10:44:48 +0000
committerPatrick Boettcher <devnull@localhost>2005-04-29 10:44:48 +0000
commite86aed48d36edbea2385cab090e464064c5620d5 (patch)
tree85f5a5c2b35c173d653954f20e97499f9f3c92c4 /linux/drivers/media/dvb/dvb-usb/digitv.c
parent4335870fc9921e4c690eff9df3be152aa2e3e606 (diff)
downloadmediapointer-dvb-s2-e86aed48d36edbea2385cab090e464064c5620d5.tar.gz
mediapointer-dvb-s2-e86aed48d36edbea2385cab090e464064c5620d5.tar.bz2
added key-mapping for the a800 (Thanks to Glen Harris)
changed remote-control-key-types and functions (saved about 80 lines code)
Diffstat (limited to 'linux/drivers/media/dvb/dvb-usb/digitv.c')
-rw-r--r--linux/drivers/media/dvb/dvb-usb/digitv.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/digitv.c b/linux/drivers/media/dvb/dvb-usb/digitv.c
index 649a5cd80..9846ed272 100644
--- a/linux/drivers/media/dvb/dvb-usb/digitv.c
+++ b/linux/drivers/media/dvb/dvb-usb/digitv.c
@@ -163,17 +163,13 @@ static int digitv_frontend_attach(struct dvb_usb_device *d)
return -EIO;
}
-
-static struct dvb_usb_nec_rc_key digitv_rc_keys[] = {
+static struct dvb_usb_rc_key digitv_rc_keys[] = {
{ 0x00, 0x16, KEY_POWER }, /* dummy key */
};
-int digitv_rc_init(struct dvb_usb_device *d)
+static int digitv_rc_init(struct dvb_usb_device *d)
{
- int i;
- u8 b[4];
- for (i = 0; i < sizeof(digitv_rc_keys)/sizeof(struct dvb_usb_nec_rc_key); i++)
- set_bit(digitv_rc_keys[i].event, d->rc_input_dev.keybit);
+ u8 b[4] = { 0 };
b[0] = 1;
digitv_ctrl_msg(d,USB_WRITE_REMOTE_TYPE,0,b,4,NULL,0);
@@ -195,8 +191,7 @@ int digitv_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
key[0] = 0x01; /* if something is inside the buffer, simulate key press */
/* call the universal NEC remote processor, to find out the key's state and event */
- dvb_usb_nec_rc_key_to_event(d,digitv_rc_keys,sizeof(digitv_rc_keys)/sizeof(struct dvb_usb_nec_rc_key),
- key,event,state);
+ dvb_usb_nec_rc_key_to_event(d,key,event,state);
if (key[0] != 0)
deb_rc("key: %x %x %x %x %x\n",key[0],key[1],key[2],key[3],key[4]);
return 0;
@@ -235,7 +230,7 @@ static struct dvb_usb_properties digitv_properties = {
.read_mac_address = NULL,
.rc_interval = 1000,
- .init_rc = digitv_rc_init,
+ .rc_key_map = digitv_rc_keys,
.query_rc = digitv_rc_query,
.identify_state = digitv_identify_state,