diff options
Diffstat (limited to 'drivers/media/rc/ir-rc5-decoder.c')
-rw-r--r-- | drivers/media/rc/ir-rc5-decoder.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/media/rc/ir-rc5-decoder.c b/drivers/media/rc/ir-rc5-decoder.c index c07f6e0bb96..dae6f9a9b66 100644 --- a/drivers/media/rc/ir-rc5-decoder.c +++ b/drivers/media/rc/ir-rc5-decoder.c | |||
@@ -40,19 +40,18 @@ enum rc5_state { | |||
40 | 40 | ||
41 | /** | 41 | /** |
42 | * ir_rc5_decode() - Decode one RC-5 pulse or space | 42 | * ir_rc5_decode() - Decode one RC-5 pulse or space |
43 | * @input_dev: the struct input_dev descriptor of the device | 43 | * @dev: the struct rc_dev descriptor of the device |
44 | * @ev: the struct ir_raw_event descriptor of the pulse/space | 44 | * @ev: the struct ir_raw_event descriptor of the pulse/space |
45 | * | 45 | * |
46 | * This function returns -EINVAL if the pulse violates the state machine | 46 | * This function returns -EINVAL if the pulse violates the state machine |
47 | */ | 47 | */ |
48 | static int ir_rc5_decode(struct input_dev *input_dev, struct ir_raw_event ev) | 48 | static int ir_rc5_decode(struct rc_dev *dev, struct ir_raw_event ev) |
49 | { | 49 | { |
50 | struct ir_input_dev *ir_dev = input_get_drvdata(input_dev); | 50 | struct rc5_dec *data = &dev->raw->rc5; |
51 | struct rc5_dec *data = &ir_dev->raw->rc5; | ||
52 | u8 toggle; | 51 | u8 toggle; |
53 | u32 scancode; | 52 | u32 scancode; |
54 | 53 | ||
55 | if (!(ir_dev->raw->enabled_protocols & IR_TYPE_RC5)) | 54 | if (!(dev->raw->enabled_protocols & IR_TYPE_RC5)) |
56 | return 0; | 55 | return 0; |
57 | 56 | ||
58 | if (!is_timing_event(ev)) { | 57 | if (!is_timing_event(ev)) { |
@@ -96,7 +95,7 @@ again: | |||
96 | return 0; | 95 | return 0; |
97 | 96 | ||
98 | case STATE_BIT_END: | 97 | case STATE_BIT_END: |
99 | if (!is_transition(&ev, &ir_dev->raw->prev_ev)) | 98 | if (!is_transition(&ev, &dev->raw->prev_ev)) |
100 | break; | 99 | break; |
101 | 100 | ||
102 | if (data->count == data->wanted_bits) | 101 | if (data->count == data->wanted_bits) |
@@ -151,7 +150,7 @@ again: | |||
151 | scancode, toggle); | 150 | scancode, toggle); |
152 | } | 151 | } |
153 | 152 | ||
154 | ir_keydown(input_dev, scancode, toggle); | 153 | ir_keydown(dev, scancode, toggle); |
155 | data->state = STATE_INACTIVE; | 154 | data->state = STATE_INACTIVE; |
156 | return 0; | 155 | return 0; |
157 | } | 156 | } |