aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-12-04 23:19:47 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-15 21:17:52 -0500
commitd30a3fe89635324397c9cf5802f18f11a49ace17 (patch)
tree9e6843ae34488b17282f51c7e06b3409afc5a6cb
parent8bea8672edfca7ec5f661cafb218f1205863b343 (diff)
V4L/DVB (13543): ir-common: Associate a table with a given protocol type
While here, convert the protocol types into an enum and define 0 as unknown. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--include/media/ir-common.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/media/ir-common.h b/include/media/ir-common.h
index e41a99ee353..28d1b9c65f2 100644
--- a/include/media/ir-common.h
+++ b/include/media/ir-common.h
@@ -32,9 +32,13 @@ extern int media_ir_debug; /* media_ir_debug level (0,1,2) */
32#define IR_dprintk(level, fmt, arg...) if (media_ir_debug >= level) \ 32#define IR_dprintk(level, fmt, arg...) if (media_ir_debug >= level) \
33 printk(KERN_DEBUG "%s: " fmt , __func__, ## arg) 33 printk(KERN_DEBUG "%s: " fmt , __func__, ## arg)
34 34
35#define IR_TYPE_RC5 1 35enum ir_type {
36#define IR_TYPE_PD 2 /* Pulse distance encoded IR */ 36 IR_TYPE_UNKNOWN = 0,
37#define IR_TYPE_OTHER 99 37 IR_TYPE_RC5 = 1,
38 IR_TYPE_PD = 2, /* Pulse distance encoded IR */
39 IR_TYPE_NEC = 3,
40 IR_TYPE_OTHER = 99,
41};
38 42
39struct ir_scancode { 43struct ir_scancode {
40 u16 scancode; 44 u16 scancode;
@@ -44,6 +48,7 @@ struct ir_scancode {
44struct ir_scancode_table { 48struct ir_scancode_table {
45 struct ir_scancode *scan; 49 struct ir_scancode *scan;
46 int size; 50 int size;
51 enum ir_type ir_type;
47 spinlock_t lock; 52 spinlock_t lock;
48}; 53};
49 54