diff options
author | David Härdeman <david@hardeman.nu> | 2010-04-24 17:14:00 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-19 11:58:25 -0400 |
commit | 5a143b12ebbd37154cb06699a757e9c5845c5e19 (patch) | |
tree | 349830c62baf1feca7c419f801a2576b89e25736 | |
parent | 6718e8ad950f73fc895b98a413a63cb2add3b4d2 (diff) |
V4L/DVB: ir-core: remove IR_TYPE_PD
Pulse-distance is not a protocol, it is a line coding (used by some protocols,
like NEC). Looking at the uses of IR_TYPE_PD, the real protocol seems to be
NEC in all cases (drivers/media/video/cx88/cx88-input.c is the only user).
So, remove IR_TYPE_PD while it is still easy to do so.
Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/IR/ir-sysfs.c | 6 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-input.c | 8 | ||||
-rw-r--r-- | include/media/ir-kbd-i2c.h | 2 | ||||
-rw-r--r-- | include/media/rc-map.h | 9 |
4 files changed, 9 insertions, 16 deletions
diff --git a/drivers/media/IR/ir-sysfs.c b/drivers/media/IR/ir-sysfs.c index 002b14123319..d7da63e16c92 100644 --- a/drivers/media/IR/ir-sysfs.c +++ b/drivers/media/IR/ir-sysfs.c | |||
@@ -57,8 +57,6 @@ static ssize_t show_protocol(struct device *d, | |||
57 | s = "Unknown"; | 57 | s = "Unknown"; |
58 | else if (ir_type == IR_TYPE_RC5) | 58 | else if (ir_type == IR_TYPE_RC5) |
59 | s = "rc-5"; | 59 | s = "rc-5"; |
60 | else if (ir_type == IR_TYPE_PD) | ||
61 | s = "pulse-distance"; | ||
62 | else if (ir_type == IR_TYPE_NEC) | 60 | else if (ir_type == IR_TYPE_NEC) |
63 | s = "nec"; | 61 | s = "nec"; |
64 | else if (ir_type == IR_TYPE_RC6) | 62 | else if (ir_type == IR_TYPE_RC6) |
@@ -100,8 +98,6 @@ static ssize_t store_protocol(struct device *d, | |||
100 | while ((buf = strsep((char **) &data, " \n")) != NULL) { | 98 | while ((buf = strsep((char **) &data, " \n")) != NULL) { |
101 | if (!strcasecmp(buf, "rc-5") || !strcasecmp(buf, "rc5")) | 99 | if (!strcasecmp(buf, "rc-5") || !strcasecmp(buf, "rc5")) |
102 | ir_type |= IR_TYPE_RC5; | 100 | ir_type |= IR_TYPE_RC5; |
103 | if (!strcasecmp(buf, "pd") || !strcasecmp(buf, "pulse-distance")) | ||
104 | ir_type |= IR_TYPE_PD; | ||
105 | if (!strcasecmp(buf, "nec")) | 101 | if (!strcasecmp(buf, "nec")) |
106 | ir_type |= IR_TYPE_NEC; | 102 | ir_type |= IR_TYPE_NEC; |
107 | if (!strcasecmp(buf, "jvc")) | 103 | if (!strcasecmp(buf, "jvc")) |
@@ -146,8 +142,6 @@ static ssize_t show_supported_protocols(struct device *d, | |||
146 | buf += sprintf(buf, "unknown "); | 142 | buf += sprintf(buf, "unknown "); |
147 | if (ir_dev->props->allowed_protos & IR_TYPE_RC5) | 143 | if (ir_dev->props->allowed_protos & IR_TYPE_RC5) |
148 | buf += sprintf(buf, "rc-5 "); | 144 | buf += sprintf(buf, "rc-5 "); |
149 | if (ir_dev->props->allowed_protos & IR_TYPE_PD) | ||
150 | buf += sprintf(buf, "pulse-distance "); | ||
151 | if (ir_dev->props->allowed_protos & IR_TYPE_NEC) | 145 | if (ir_dev->props->allowed_protos & IR_TYPE_NEC) |
152 | buf += sprintf(buf, "nec "); | 146 | buf += sprintf(buf, "nec "); |
153 | if (buf == orgbuf) | 147 | if (buf == orgbuf) |
diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/video/cx88/cx88-input.c index 76733349c6cc..e185289e446c 100644 --- a/drivers/media/video/cx88/cx88-input.c +++ b/drivers/media/video/cx88/cx88-input.c | |||
@@ -272,7 +272,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) | |||
272 | break; | 272 | break; |
273 | case CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1: | 273 | case CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1: |
274 | ir_codes = RC_MAP_CINERGY_1400; | 274 | ir_codes = RC_MAP_CINERGY_1400; |
275 | ir_type = IR_TYPE_PD; | 275 | ir_type = IR_TYPE_NEC; |
276 | ir->sampling = 0xeb04; /* address */ | 276 | ir->sampling = 0xeb04; /* address */ |
277 | break; | 277 | break; |
278 | case CX88_BOARD_HAUPPAUGE: | 278 | case CX88_BOARD_HAUPPAUGE: |
@@ -375,18 +375,18 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) | |||
375 | case CX88_BOARD_PROF_7301: | 375 | case CX88_BOARD_PROF_7301: |
376 | case CX88_BOARD_PROF_6200: | 376 | case CX88_BOARD_PROF_6200: |
377 | ir_codes = RC_MAP_TBS_NEC; | 377 | ir_codes = RC_MAP_TBS_NEC; |
378 | ir_type = IR_TYPE_PD; | 378 | ir_type = IR_TYPE_NEC; |
379 | ir->sampling = 0xff00; /* address */ | 379 | ir->sampling = 0xff00; /* address */ |
380 | break; | 380 | break; |
381 | case CX88_BOARD_TEVII_S460: | 381 | case CX88_BOARD_TEVII_S460: |
382 | case CX88_BOARD_TEVII_S420: | 382 | case CX88_BOARD_TEVII_S420: |
383 | ir_codes = RC_MAP_TEVII_NEC; | 383 | ir_codes = RC_MAP_TEVII_NEC; |
384 | ir_type = IR_TYPE_PD; | 384 | ir_type = IR_TYPE_NEC; |
385 | ir->sampling = 0xff00; /* address */ | 385 | ir->sampling = 0xff00; /* address */ |
386 | break; | 386 | break; |
387 | case CX88_BOARD_DNTV_LIVE_DVB_T_PRO: | 387 | case CX88_BOARD_DNTV_LIVE_DVB_T_PRO: |
388 | ir_codes = RC_MAP_DNTV_LIVE_DVBT_PRO; | 388 | ir_codes = RC_MAP_DNTV_LIVE_DVBT_PRO; |
389 | ir_type = IR_TYPE_PD; | 389 | ir_type = IR_TYPE_NEC; |
390 | ir->sampling = 0xff00; /* address */ | 390 | ir->sampling = 0xff00; /* address */ |
391 | break; | 391 | break; |
392 | case CX88_BOARD_NORWOOD_MICRO: | 392 | case CX88_BOARD_NORWOOD_MICRO: |
diff --git a/include/media/ir-kbd-i2c.h b/include/media/ir-kbd-i2c.h index 057ff64f349d..0506e45c9a4f 100644 --- a/include/media/ir-kbd-i2c.h +++ b/include/media/ir-kbd-i2c.h | |||
@@ -36,7 +36,7 @@ enum ir_kbd_get_key_fn { | |||
36 | struct IR_i2c_init_data { | 36 | struct IR_i2c_init_data { |
37 | char *ir_codes; | 37 | char *ir_codes; |
38 | const char *name; | 38 | const char *name; |
39 | u64 type; /* IR_TYPE_RC5, IR_TYPE_PD, etc */ | 39 | u64 type; /* IR_TYPE_RC5, etc */ |
40 | /* | 40 | /* |
41 | * Specify either a function pointer or a value indicating one of | 41 | * Specify either a function pointer or a value indicating one of |
42 | * ir_kbd_i2c's internal get_key functions | 42 | * ir_kbd_i2c's internal get_key functions |
diff --git a/include/media/rc-map.h b/include/media/rc-map.h index 280d1ed9a9a0..5833966a7100 100644 --- a/include/media/rc-map.h +++ b/include/media/rc-map.h | |||
@@ -13,11 +13,10 @@ | |||
13 | 13 | ||
14 | #define IR_TYPE_UNKNOWN 0 | 14 | #define IR_TYPE_UNKNOWN 0 |
15 | #define IR_TYPE_RC5 (1 << 0) /* Philips RC5 protocol */ | 15 | #define IR_TYPE_RC5 (1 << 0) /* Philips RC5 protocol */ |
16 | #define IR_TYPE_PD (1 << 1) /* Pulse distance encoded IR */ | 16 | #define IR_TYPE_NEC (1 << 1) |
17 | #define IR_TYPE_NEC (1 << 2) | 17 | #define IR_TYPE_RC6 (1 << 2) /* Philips RC6 protocol */ |
18 | #define IR_TYPE_RC6 (1 << 3) /* Philips RC6 protocol */ | 18 | #define IR_TYPE_JVC (1 << 3) /* JVC protocol */ |
19 | #define IR_TYPE_JVC (1 << 4) /* JVC protocol */ | 19 | #define IR_TYPE_SONY (1 << 4) /* Sony12/15/20 protocol */ |
20 | #define IR_TYPE_SONY (1 << 5) /* Sony12/15/20 protocol */ | ||
21 | #define IR_TYPE_OTHER (1u << 31) | 20 | #define IR_TYPE_OTHER (1u << 31) |
22 | 21 | ||
23 | struct ir_scancode { | 22 | struct ir_scancode { |