Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 219cb08a authored by Sean Young's avatar Sean Young Committed by Mauro Carvalho Chehab
Browse files

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: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 518f4b26
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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);