Commit d80ca8bd authored by Heiner Kallweit's avatar Heiner Kallweit Committed by Mauro Carvalho Chehab
Browse files

[media] media: rc: move check whether a protocol is enabled to the core



Checking whether a protocol is enabled and calling the related decoder
functions should be done by the rc core, not the protocol handlers.

Properly handle lirc considering that no protocol bit is set for lirc.

Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent acc1c3c6
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -47,9 +47,6 @@ static int ir_jvc_decode(struct rc_dev *dev, struct ir_raw_event ev)
{
	struct jvc_dec *data = &dev->raw->jvc;

	if (!(dev->enabled_protocols & RC_BIT_JVC))
		return 0;

	if (!is_timing_event(ev)) {
		if (ev.reset)
			data->state = STATE_INACTIVE;
+0 −3
Original line number Diff line number Diff line
@@ -216,9 +216,6 @@ static int ir_mce_kbd_decode(struct rc_dev *dev, struct ir_raw_event ev)
	u32 scancode;
	unsigned long delay;

	if (!(dev->enabled_protocols & RC_BIT_MCE_KBD))
		return 0;

	if (!is_timing_event(ev)) {
		if (ev.reset)
			data->state = STATE_INACTIVE;
+0 −3
Original line number Diff line number Diff line
@@ -52,9 +52,6 @@ static int ir_nec_decode(struct rc_dev *dev, struct ir_raw_event ev)
	u8 address, not_address, command, not_command;
	bool send_32bits = false;

	if (!(dev->enabled_protocols & RC_BIT_NEC))
		return 0;

	if (!is_timing_event(ev)) {
		if (ev.reset)
			data->state = STATE_INACTIVE;
+0 −3
Original line number Diff line number Diff line
@@ -53,9 +53,6 @@ static int ir_rc5_decode(struct rc_dev *dev, struct ir_raw_event ev)
	u32 scancode;
	enum rc_type protocol;

	if (!(dev->enabled_protocols & (RC_BIT_RC5 | RC_BIT_RC5X | RC_BIT_RC5_SZ)))
		return 0;

	if (!is_timing_event(ev)) {
		if (ev.reset)
			data->state = STATE_INACTIVE;
+0 −5
Original line number Diff line number Diff line
@@ -90,11 +90,6 @@ static int ir_rc6_decode(struct rc_dev *dev, struct ir_raw_event ev)
	u8 toggle;
	enum rc_type protocol;

	if (!(dev->enabled_protocols &
	      (RC_BIT_RC6_0 | RC_BIT_RC6_6A_20 | RC_BIT_RC6_6A_24 |
	       RC_BIT_RC6_6A_32 | RC_BIT_RC6_MCE)))
		return 0;

	if (!is_timing_event(ev)) {
		if (ev.reset)
			data->state = STATE_INACTIVE;
Loading