diff options
Diffstat (limited to 'drivers/media/rc/ir-rc5-sz-decoder.c')
-rw-r--r-- | drivers/media/rc/ir-rc5-sz-decoder.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/media/rc/ir-rc5-sz-decoder.c b/drivers/media/rc/ir-rc5-sz-decoder.c index 0c3b6eb4ccd..d8a53c02c1e 100644 --- a/drivers/media/rc/ir-rc5-sz-decoder.c +++ b/drivers/media/rc/ir-rc5-sz-decoder.c | |||
@@ -36,19 +36,18 @@ enum rc5_sz_state { | |||
36 | 36 | ||
37 | /** | 37 | /** |
38 | * ir_rc5_sz_decode() - Decode one RC-5 Streamzap pulse or space | 38 | * ir_rc5_sz_decode() - Decode one RC-5 Streamzap pulse or space |
39 | * @input_dev: the struct input_dev descriptor of the device | 39 | * @dev: the struct rc_dev descriptor of the device |
40 | * @ev: the struct ir_raw_event descriptor of the pulse/space | 40 | * @ev: the struct ir_raw_event descriptor of the pulse/space |
41 | * | 41 | * |
42 | * This function returns -EINVAL if the pulse violates the state machine | 42 | * This function returns -EINVAL if the pulse violates the state machine |
43 | */ | 43 | */ |
44 | static int ir_rc5_sz_decode(struct input_dev *input_dev, struct ir_raw_event ev) | 44 | static int ir_rc5_sz_decode(struct rc_dev *dev, struct ir_raw_event ev) |
45 | { | 45 | { |
46 | struct ir_input_dev *ir_dev = input_get_drvdata(input_dev); | 46 | struct rc5_sz_dec *data = &dev->raw->rc5_sz; |
47 | struct rc5_sz_dec *data = &ir_dev->raw->rc5_sz; | ||
48 | u8 toggle, command, system; | 47 | u8 toggle, command, system; |
49 | u32 scancode; | 48 | u32 scancode; |
50 | 49 | ||
51 | if (!(ir_dev->raw->enabled_protocols & IR_TYPE_RC5_SZ)) | 50 | if (!(dev->raw->enabled_protocols & IR_TYPE_RC5_SZ)) |
52 | return 0; | 51 | return 0; |
53 | 52 | ||
54 | if (!is_timing_event(ev)) { | 53 | if (!is_timing_event(ev)) { |
@@ -91,7 +90,7 @@ again: | |||
91 | return 0; | 90 | return 0; |
92 | 91 | ||
93 | case STATE_BIT_END: | 92 | case STATE_BIT_END: |
94 | if (!is_transition(&ev, &ir_dev->raw->prev_ev)) | 93 | if (!is_transition(&ev, &dev->raw->prev_ev)) |
95 | break; | 94 | break; |
96 | 95 | ||
97 | if (data->count == data->wanted_bits) | 96 | if (data->count == data->wanted_bits) |
@@ -115,7 +114,7 @@ again: | |||
115 | IR_dprintk(1, "RC5-sz scancode 0x%04x (toggle: %u)\n", | 114 | IR_dprintk(1, "RC5-sz scancode 0x%04x (toggle: %u)\n", |
116 | scancode, toggle); | 115 | scancode, toggle); |
117 | 116 | ||
118 | ir_keydown(input_dev, scancode, toggle); | 117 | ir_keydown(dev, scancode, toggle); |
119 | data->state = STATE_INACTIVE; | 118 | data->state = STATE_INACTIVE; |
120 | return 0; | 119 | return 0; |
121 | } | 120 | } |