diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-08-24 00:07:12 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-09 21:08:27 -0400 |
commit | 3c44358c49ee4142d0f868509b5b3b02759fa16a (patch) | |
tree | a08d654b2069e39d44784f17466e960636397d8f /drivers/media/video/ir-kbd-i2c.c | |
parent | d54d6980916d5521ad47fa61e5b6ff8733221714 (diff) |
V4L/DVB (6179): Clean up FusionHDTV ir code
- fixed missing buttons in keymap.
- make function names & descriptions more generic,
since this same ir receiver and remote is used in
many FusionHDTV products.
- miscellaneous cleanups.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/ir-kbd-i2c.c')
-rw-r--r-- | drivers/media/video/ir-kbd-i2c.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c index 3d5a28c2c929..04f6eb5ea292 100644 --- a/drivers/media/video/ir-kbd-i2c.c +++ b/drivers/media/video/ir-kbd-i2c.c | |||
@@ -143,7 +143,7 @@ static int get_key_pv951(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) | |||
143 | return 1; | 143 | return 1; |
144 | } | 144 | } |
145 | 145 | ||
146 | static int get_key_fusion_gold(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) | 146 | static int get_key_fusionhdtv(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) |
147 | { | 147 | { |
148 | unsigned char buf[4]; | 148 | unsigned char buf[4]; |
149 | 149 | ||
@@ -154,7 +154,7 @@ static int get_key_fusion_gold(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) | |||
154 | } | 154 | } |
155 | 155 | ||
156 | if(buf[0] !=0 || buf[1] !=0 || buf[2] !=0 || buf[3] != 0) | 156 | if(buf[0] !=0 || buf[1] !=0 || buf[2] !=0 || buf[3] != 0) |
157 | dprintk(2, "ir fusion gold: 0x%2x 0x%2x 0x%2x 0x%2x\n", | 157 | dprintk(2, "%s: 0x%2x 0x%2x 0x%2x 0x%2x\n", __FUNCTION__, |
158 | buf[0], buf[1], buf[2], buf[3]); | 158 | buf[0], buf[1], buf[2], buf[3]); |
159 | 159 | ||
160 | /* no key pressed or signal from other ir remote */ | 160 | /* no key pressed or signal from other ir remote */ |
@@ -165,10 +165,8 @@ static int get_key_fusion_gold(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) | |||
165 | *ir_raw = (buf[2] << 8) | buf[3]; | 165 | *ir_raw = (buf[2] << 8) | buf[3]; |
166 | 166 | ||
167 | return 1; | 167 | return 1; |
168 | |||
169 | } | 168 | } |
170 | 169 | ||
171 | |||
172 | static int get_key_knc1(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) | 170 | static int get_key_knc1(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) |
173 | { | 171 | { |
174 | unsigned char b; | 172 | unsigned char b; |
@@ -392,10 +390,10 @@ static int ir_attach(struct i2c_adapter *adap, int addr, | |||
392 | ir_codes = ir_codes_empty; | 390 | ir_codes = ir_codes_empty; |
393 | break; | 391 | break; |
394 | case 0x6b: | 392 | case 0x6b: |
395 | name = "FusionGold"; | 393 | name = "FusionHDTV"; |
396 | ir->get_key = get_key_fusion_gold; | 394 | ir->get_key = get_key_fusionhdtv; |
397 | ir_type = IR_TYPE_RC5; | 395 | ir_type = IR_TYPE_RC5; |
398 | ir_codes = ir_codes_fusion_gold; | 396 | ir_codes = ir_codes_fusionhdtv_mce; |
399 | break; | 397 | break; |
400 | case 0x7a: | 398 | case 0x7a: |
401 | case 0x47: | 399 | case 0x47: |