aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-12-14 11:53:37 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-02-26 13:10:24 -0500
commit971e8298dee4835fc2dfbd207a9786702aa01666 (patch)
treebe01801dd5631acc72eae7c16abbf1b834c66775 /include/media
parent3f831107ed8efc32960e0cd172799bb82f6c81c9 (diff)
V4L/DVB (13680): ir: use unsigned long instead of enum
When preparing the linux-next patches, I got those errors: include/media/ir-core.h:29: warning: left shift count >= width of type In file included from include/media/ir-common.h:29, from drivers/media/video/ir-kbd-i2c.c:50: drivers/media/video/ir-kbd-i2c.c: In function ‘ir_probe’: drivers/media/video/ir-kbd-i2c.c:324: warning: left shift count >= width of type Unfortunately, enum is 32 bits on i386. As we define IR_TYPE_OTHER as 1<<63, it won't work on non 64 bits arch. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/ir-common.h4
-rw-r--r--include/media/ir-core.h16
-rw-r--r--include/media/ir-kbd-i2c.h2
3 files changed, 10 insertions, 12 deletions
diff --git a/include/media/ir-common.h b/include/media/ir-common.h
index 1b43b772165a..015db75b42f6 100644
--- a/include/media/ir-common.h
+++ b/include/media/ir-common.h
@@ -35,7 +35,7 @@
35 35
36struct ir_input_state { 36struct ir_input_state {
37 /* configuration */ 37 /* configuration */
38 enum ir_type ir_type; 38 u64 ir_type;
39 39
40 /* key info */ 40 /* key info */
41 u32 ir_key; /* ir scancode */ 41 u32 ir_key; /* ir scancode */
@@ -84,7 +84,7 @@ struct card_ir {
84/* Routines from ir-functions.c */ 84/* Routines from ir-functions.c */
85 85
86int ir_input_init(struct input_dev *dev, struct ir_input_state *ir, 86int ir_input_init(struct input_dev *dev, struct ir_input_state *ir,
87 const enum ir_type ir_type); 87 const u64 ir_type);
88void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir); 88void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir);
89void ir_input_keydown(struct input_dev *dev, struct ir_input_state *ir, 89void ir_input_keydown(struct input_dev *dev, struct ir_input_state *ir,
90 u32 ir_key); 90 u32 ir_key);
diff --git a/include/media/ir-core.h b/include/media/ir-core.h
index a6d07dede09f..d96f25a08451 100644
--- a/include/media/ir-core.h
+++ b/include/media/ir-core.h
@@ -21,13 +21,11 @@ extern int ir_core_debug;
21#define IR_dprintk(level, fmt, arg...) if (ir_core_debug >= level) \ 21#define IR_dprintk(level, fmt, arg...) if (ir_core_debug >= level) \
22 printk(KERN_DEBUG "%s: " fmt , __func__, ## arg) 22 printk(KERN_DEBUG "%s: " fmt , __func__, ## arg)
23 23
24enum ir_type { 24#define IR_TYPE_UNKNOWN 0
25 IR_TYPE_UNKNOWN = 0, 25#define IR_TYPE_RC5 (1 << 0) /* Philips RC5 protocol */
26 IR_TYPE_RC5 = 1L << 0, /* Philips RC5 protocol */ 26#define IR_TYPE_PD (1 << 1) /* Pulse distance encoded IR */
27 IR_TYPE_PD = 1L << 1, /* Pulse distance encoded IR */ 27#define IR_TYPE_NEC (1 << 2)
28 IR_TYPE_NEC = 1L << 2, 28#define IR_TYPE_OTHER (((u64)1) << 63l)
29 IR_TYPE_OTHER = 1L << 63,
30};
31 29
32struct ir_scancode { 30struct ir_scancode {
33 u16 scancode; 31 u16 scancode;
@@ -37,14 +35,14 @@ struct ir_scancode {
37struct ir_scancode_table { 35struct ir_scancode_table {
38 struct ir_scancode *scan; 36 struct ir_scancode *scan;
39 int size; 37 int size;
40 enum ir_type ir_type; 38 u64 ir_type;
41 spinlock_t lock; 39 spinlock_t lock;
42}; 40};
43 41
44struct ir_dev_props { 42struct ir_dev_props {
45 unsigned long allowed_protos; 43 unsigned long allowed_protos;
46 void *priv; 44 void *priv;
47 int (*change_protocol)(void *priv, enum ir_type ir_type); 45 int (*change_protocol)(void *priv, u64 ir_type);
48}; 46};
49 47
50 48
diff --git a/include/media/ir-kbd-i2c.h b/include/media/ir-kbd-i2c.h
index 45926e3559f3..9142936603cc 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 {
36struct IR_i2c_init_data { 36struct IR_i2c_init_data {
37 struct ir_scancode_table *ir_codes; 37 struct ir_scancode_table *ir_codes;
38 const char *name; 38 const char *name;
39 enum ir_type type; /* IR_TYPE_RC5, IR_TYPE_PD, etc */ 39 u64 type; /* IR_TYPE_RC5, IR_TYPE_PD, 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