提交 d30a3fe8 编写于 作者: M Mauro Carvalho Chehab

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: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 8bea8672
...@@ -32,9 +32,13 @@ extern int media_ir_debug; /* media_ir_debug level (0,1,2) */ ...@@ -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) \ #define IR_dprintk(level, fmt, arg...) if (media_ir_debug >= level) \
printk(KERN_DEBUG "%s: " fmt , __func__, ## arg) printk(KERN_DEBUG "%s: " fmt , __func__, ## arg)
#define IR_TYPE_RC5 1 enum ir_type {
#define IR_TYPE_PD 2 /* Pulse distance encoded IR */ IR_TYPE_UNKNOWN = 0,
#define IR_TYPE_OTHER 99 IR_TYPE_RC5 = 1,
IR_TYPE_PD = 2, /* Pulse distance encoded IR */
IR_TYPE_NEC = 3,
IR_TYPE_OTHER = 99,
};
struct ir_scancode { struct ir_scancode {
u16 scancode; u16 scancode;
...@@ -44,6 +48,7 @@ struct ir_scancode { ...@@ -44,6 +48,7 @@ struct ir_scancode {
struct ir_scancode_table { struct ir_scancode_table {
struct ir_scancode *scan; struct ir_scancode *scan;
int size; int size;
enum ir_type ir_type;
spinlock_t lock; spinlock_t lock;
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册