diff options
author | Patrick Boettcher <devnull@localhost> | 2005-02-19 09:46:02 +0000 |
---|---|---|
committer | Patrick Boettcher <devnull@localhost> | 2005-02-19 09:46:02 +0000 |
commit | 04b0f4bfbebfbbb8d899e0e329215651f8b2e62c (patch) | |
tree | ada8c79a2ba14febb4e4f56094e94b574d085034 /linux/drivers/media/dvb/dibusb/dvb-dibusb-remote.c | |
parent | fa6b156a6e41359640346fb80ac0a7119052a32c (diff) | |
download | mediapointer-dvb-s2-04b0f4bfbebfbbb8d899e0e329215651f8b2e62c.tar.gz mediapointer-dvb-s2-04b0f4bfbebfbbb8d899e0e329215651f8b2e62c.tar.bz2 |
*argl* - initialization was wrong
Diffstat (limited to 'linux/drivers/media/dvb/dibusb/dvb-dibusb-remote.c')
-rw-r--r-- | linux/drivers/media/dvb/dibusb/dvb-dibusb-remote.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/linux/drivers/media/dvb/dibusb/dvb-dibusb-remote.c b/linux/drivers/media/dvb/dibusb/dvb-dibusb-remote.c index c73b3f9c6..8baaef1c7 100644 --- a/linux/drivers/media/dvb/dibusb/dvb-dibusb-remote.c +++ b/linux/drivers/media/dvb/dibusb/dvb-dibusb-remote.c @@ -254,11 +254,19 @@ int dibusb_remote_init(struct usb_dibusb *dib) dib->rc_input_dev.keycodemax = KEY_MAX; dib->rc_input_dev.name = DRIVER_DESC " remote control"; - for (i=0; i<sizeof(nec_rc_keys)/sizeof(nec_rc_keys[0]); i++) - set_bit(haupp_rc_keys[i].key, dib->rc_input_dev.keybit); + switch (dib->dibdev->dev_cl->remote_type) { + case DIBUSB_RC_NEC_PROTOCOL: + for (i=0; i<sizeof(nec_rc_keys)/sizeof(nec_rc_keys[0]); i++) + set_bit(nec_rc_keys[i].key, dib->rc_input_dev.keybit); + break; + case DIBUSB_RC_HAUPPAUGE_PROTO: + for (i=0; i<sizeof(haupp_rc_keys)/sizeof(haupp_rc_keys[0]); i++) + set_bit(haupp_rc_keys[i].key, dib->rc_input_dev.keybit); + break; + default: + break; + } - for (i=0; i<sizeof(haupp_rc_keys)/sizeof(haupp_rc_keys[0]); i++) - set_bit(haupp_rc_keys[i].key, dib->rc_input_dev.keybit); input_register_device(&dib->rc_input_dev); |