diff options
author | Sean Young <sean@mess.org> | 2017-07-01 21:11:56 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-08-20 15:44:39 +0200 |
commit | 219cb08ac015535c9c79a2f5730fca7c89915f17 (patch) | |
tree | 58e7b9706bdda17b3117a274ba67506c4b59accc /drivers/media/rc/ir-mce_kbd-decoder.c | |
parent | media: rc-core: rename input_name to device_name (diff) | |
download | linux-219cb08ac015535c9c79a2f5730fca7c89915f17.tar.xz linux-219cb08ac015535c9c79a2f5730fca7c89915f17.zip |
media: rc: mce kbd decoder not needed for IR TX drivers
Without this patch, an input device is created which is not necessary.
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/rc/ir-mce_kbd-decoder.c')
-rw-r--r-- | drivers/media/rc/ir-mce_kbd-decoder.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/rc/ir-mce_kbd-decoder.c b/drivers/media/rc/ir-mce_kbd-decoder.c index 6a4d58b88d91..5de14ae77421 100644 --- a/drivers/media/rc/ir-mce_kbd-decoder.c +++ b/drivers/media/rc/ir-mce_kbd-decoder.c @@ -358,6 +358,9 @@ static int ir_mce_kbd_register(struct rc_dev *dev) struct input_dev *idev; int i, ret; + if (dev->driver_type == RC_DRIVER_IR_RAW_TX) + return 0; + idev = input_allocate_device(); if (!idev) return -ENOMEM; @@ -413,6 +416,9 @@ static int ir_mce_kbd_unregister(struct rc_dev *dev) struct mce_kbd_dec *mce_kbd = &dev->raw->mce_kbd; struct input_dev *idev = mce_kbd->idev; + if (dev->driver_type == RC_DRIVER_IR_RAW_TX) + return 0; + del_timer_sync(&mce_kbd->rx_timeout); input_unregister_device(idev); |