summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/dvb-usb/dib0700_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/usb/dvb-usb/dib0700_core.c')
-rw-r--r--drivers/media/usb/dvb-usb/dib0700_core.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/media/usb/dvb-usb/dib0700_core.c b/drivers/media/usb/dvb-usb/dib0700_core.c
index 38b151f..50856db 100644
--- a/drivers/media/usb/dvb-usb/dib0700_core.c
+++ b/drivers/media/usb/dvb-usb/dib0700_core.c
@@ -669,6 +669,7 @@ static void dib0700_rc_urb_completion(struct urb *purb)
{
struct dvb_usb_device *d = purb->context;
struct dib0700_rc_response *poll_reply;
+ enum rc_type protocol;
u32 uninitialized_var(keycode);
u8 toggle;
@@ -702,6 +703,7 @@ static void dib0700_rc_urb_completion(struct urb *purb)
switch (d->props.rc.core.protocol) {
case RC_BIT_NEC:
+ protocol = RC_TYPE_NEC;
toggle = 0;
/* NEC protocol sends repeat code as 0 0 0 FF */
@@ -724,6 +726,7 @@ static void dib0700_rc_urb_completion(struct urb *purb)
keycode = RC_SCANCODE_NECX(poll_reply->system << 8 |
poll_reply->not_system,
poll_reply->data);
+
} else {
deb_data("NEC normal protocol\n");
keycode = RC_SCANCODE_NEC(poll_reply->system,
@@ -733,9 +736,9 @@ static void dib0700_rc_urb_completion(struct urb *purb)
break;
default:
deb_data("RC5 protocol\n");
- /* RC5 Protocol */
+ protocol = RC_TYPE_RC5;
toggle = poll_reply->report_id;
- keycode = poll_reply->system << 8 | poll_reply->data;
+ keycode = RC_SCANCODE_RC5(poll_reply->system, poll_reply->data);
break;
}
@@ -748,7 +751,7 @@ static void dib0700_rc_urb_completion(struct urb *purb)
goto resubmit;
}
- rc_keydown(d->rc_dev, keycode, toggle);
+ rc_keydown(d->rc_dev, protocol, keycode, toggle);
resubmit:
/* Clean the buffer before we requeue */
OpenPOWER on IntegriCloud