diff options
Diffstat (limited to 'drivers/media/rc/ir-jvc-decoder.c')
-rw-r--r-- | drivers/media/rc/ir-jvc-decoder.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/media/rc/ir-jvc-decoder.c b/drivers/media/rc/ir-jvc-decoder.c index d83a5f64bfe4..cfe0e70440a5 100644 --- a/drivers/media/rc/ir-jvc-decoder.c +++ b/drivers/media/rc/ir-jvc-decoder.c | |||
@@ -37,17 +37,16 @@ enum jvc_state { | |||
37 | 37 | ||
38 | /** | 38 | /** |
39 | * ir_jvc_decode() - Decode one JVC pulse or space | 39 | * ir_jvc_decode() - Decode one JVC pulse or space |
40 | * @input_dev: the struct input_dev descriptor of the device | 40 | * @dev: the struct rc_dev descriptor of the device |
41 | * @duration: the struct ir_raw_event descriptor of the pulse/space | 41 | * @duration: the struct ir_raw_event descriptor of the pulse/space |
42 | * | 42 | * |
43 | * This function returns -EINVAL if the pulse violates the state machine | 43 | * This function returns -EINVAL if the pulse violates the state machine |
44 | */ | 44 | */ |
45 | static int ir_jvc_decode(struct input_dev *input_dev, struct ir_raw_event ev) | 45 | static int ir_jvc_decode(struct rc_dev *dev, struct ir_raw_event ev) |
46 | { | 46 | { |
47 | struct ir_input_dev *ir_dev = input_get_drvdata(input_dev); | 47 | struct jvc_dec *data = &dev->raw->jvc; |
48 | struct jvc_dec *data = &ir_dev->raw->jvc; | ||
49 | 48 | ||
50 | if (!(ir_dev->raw->enabled_protocols & IR_TYPE_JVC)) | 49 | if (!(dev->raw->enabled_protocols & IR_TYPE_JVC)) |
51 | return 0; | 50 | return 0; |
52 | 51 | ||
53 | if (!is_timing_event(ev)) { | 52 | if (!is_timing_event(ev)) { |
@@ -140,12 +139,12 @@ again: | |||
140 | scancode = (bitrev8((data->bits >> 8) & 0xff) << 8) | | 139 | scancode = (bitrev8((data->bits >> 8) & 0xff) << 8) | |
141 | (bitrev8((data->bits >> 0) & 0xff) << 0); | 140 | (bitrev8((data->bits >> 0) & 0xff) << 0); |
142 | IR_dprintk(1, "JVC scancode 0x%04x\n", scancode); | 141 | IR_dprintk(1, "JVC scancode 0x%04x\n", scancode); |
143 | ir_keydown(input_dev, scancode, data->toggle); | 142 | ir_keydown(dev, scancode, data->toggle); |
144 | data->first = false; | 143 | data->first = false; |
145 | data->old_bits = data->bits; | 144 | data->old_bits = data->bits; |
146 | } else if (data->bits == data->old_bits) { | 145 | } else if (data->bits == data->old_bits) { |
147 | IR_dprintk(1, "JVC repeat\n"); | 146 | IR_dprintk(1, "JVC repeat\n"); |
148 | ir_repeat(input_dev); | 147 | ir_repeat(dev); |
149 | } else { | 148 | } else { |
150 | IR_dprintk(1, "JVC invalid repeat msg\n"); | 149 | IR_dprintk(1, "JVC invalid repeat msg\n"); |
151 | break; | 150 | break; |