[media] dvb-usb-remote: don't write bogus debug messages
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Thu, 18 May 2017 12:15:52 +0000 (09:15 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 19 May 2017 10:09:05 +0000 (07:09 -0300)
When a REMOTE_KEY_PRESSED event happens, it does the right
thing. However, if debug is enabled, it will print a bogus
message warning that "key repeated".

Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/usb/dvb-usb/dvb-usb-remote.c

index 059ded59208e8af0275b064efd5c5659130ae228..f05f1fc80729228a82c16f675f8615aa76c7e16a 100644 (file)
@@ -131,6 +131,11 @@ static void legacy_dvb_usb_read_remote_control(struct work_struct *work)
                case REMOTE_KEY_PRESSED:
                        deb_rc("key pressed\n");
                        d->last_event = event;
+                       input_event(d->input_dev, EV_KEY, event, 1);
+                       input_sync(d->input_dev);
+                       input_event(d->input_dev, EV_KEY, d->last_event, 0);
+                       input_sync(d->input_dev);
+                       break;
                case REMOTE_KEY_REPEAT:
                        deb_rc("key repeated\n");
                        input_event(d->input_dev, EV_KEY, event, 1);