From d30a3fe89635324397c9cf5802f18f11a49ace17 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 5 Dec 2009 01:19:47 -0300 Subject: [PATCH] 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 --- include/media/ir-common.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/include/media/ir-common.h b/include/media/ir-common.h index e41a99ee353e..28d1b9c65f2e 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) */ #define IR_dprintk(level, fmt, arg...) if (media_ir_debug >= level) \ printk(KERN_DEBUG "%s: " fmt , __func__, ## arg) -#define IR_TYPE_RC5 1 -#define IR_TYPE_PD 2 /* Pulse distance encoded IR */ -#define IR_TYPE_OTHER 99 +enum ir_type { + IR_TYPE_UNKNOWN = 0, + IR_TYPE_RC5 = 1, + IR_TYPE_PD = 2, /* Pulse distance encoded IR */ + IR_TYPE_NEC = 3, + IR_TYPE_OTHER = 99, +}; struct ir_scancode { u16 scancode; @@ -44,6 +48,7 @@ struct ir_scancode { struct ir_scancode_table { struct ir_scancode *scan; int size; + enum ir_type ir_type; spinlock_t lock; }; -- GitLab