diff options
author | Douglas Schilling Landgraf <dougsland@gmail.com> | 2008-04-17 20:41:10 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 13:09:41 -0400 |
commit | 6ea54d938b6f81baa0952a8b15d3e67e6c268b8f (patch) | |
tree | 3cda23563cf6f6f05927b7f7c61eaa6605a0e10d /drivers/media/video/em28xx/em28xx-input.c | |
parent | e6a353b0dc2686ae04805919e7a22430d2f1e29e (diff) |
V4L/DVB (7607): CodingStyle fixes
Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-input.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-input.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/drivers/media/video/em28xx/em28xx-input.c b/drivers/media/video/em28xx/em28xx-input.c index 10da2fd8d987..bb5807159b8d 100644 --- a/drivers/media/video/em28xx/em28xx-input.c +++ b/drivers/media/video/em28xx/em28xx-input.c | |||
@@ -32,10 +32,12 @@ | |||
32 | 32 | ||
33 | static unsigned int ir_debug; | 33 | static unsigned int ir_debug; |
34 | module_param(ir_debug, int, 0644); | 34 | module_param(ir_debug, int, 0644); |
35 | MODULE_PARM_DESC(ir_debug,"enable debug messages [IR]"); | 35 | MODULE_PARM_DESC(ir_debug, "enable debug messages [IR]"); |
36 | 36 | ||
37 | #define dprintk(fmt, arg...) if (ir_debug) \ | 37 | #define dprintk(fmt, arg...) \ |
38 | printk(KERN_DEBUG "%s/ir: " fmt, ir->c.name , ## arg) | 38 | if (ir_debug) { \ |
39 | printk(KERN_DEBUG "%s/ir: " fmt, ir->c.name , ## arg); \ | ||
40 | } | ||
39 | 41 | ||
40 | /* ----------------------------------------------------------------------- */ | 42 | /* ----------------------------------------------------------------------- */ |
41 | 43 | ||
@@ -44,7 +46,7 @@ int em28xx_get_key_terratec(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) | |||
44 | unsigned char b; | 46 | unsigned char b; |
45 | 47 | ||
46 | /* poll IR chip */ | 48 | /* poll IR chip */ |
47 | if (1 != i2c_master_recv(&ir->c,&b,1)) { | 49 | if (1 != i2c_master_recv(&ir->c, &b, 1)) { |
48 | dprintk("read error\n"); | 50 | dprintk("read error\n"); |
49 | return -EIO; | 51 | return -EIO; |
50 | } | 52 | } |
@@ -74,24 +76,25 @@ int em28xx_get_key_em_haup(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) | |||
74 | unsigned char code; | 76 | unsigned char code; |
75 | 77 | ||
76 | /* poll IR chip */ | 78 | /* poll IR chip */ |
77 | if (2 != i2c_master_recv(&ir->c,buf,2)) | 79 | if (2 != i2c_master_recv(&ir->c, buf, 2)) |
78 | return -EIO; | 80 | return -EIO; |
79 | 81 | ||
80 | /* Does eliminate repeated parity code */ | 82 | /* Does eliminate repeated parity code */ |
81 | if (buf[1]==0xff) | 83 | if (buf[1] == 0xff) |
82 | return 0; | 84 | return 0; |
83 | 85 | ||
84 | ir->old=buf[1]; | 86 | ir->old = buf[1]; |
85 | 87 | ||
86 | /* Rearranges bits to the right order */ | 88 | /* Rearranges bits to the right order */ |
87 | code= ((buf[0]&0x01)<<5) | /* 0010 0000 */ | 89 | code = ((buf[0]&0x01)<<5) | /* 0010 0000 */ |
88 | ((buf[0]&0x02)<<3) | /* 0001 0000 */ | 90 | ((buf[0]&0x02)<<3) | /* 0001 0000 */ |
89 | ((buf[0]&0x04)<<1) | /* 0000 1000 */ | 91 | ((buf[0]&0x04)<<1) | /* 0000 1000 */ |
90 | ((buf[0]&0x08)>>1) | /* 0000 0100 */ | 92 | ((buf[0]&0x08)>>1) | /* 0000 0100 */ |
91 | ((buf[0]&0x10)>>3) | /* 0000 0010 */ | 93 | ((buf[0]&0x10)>>3) | /* 0000 0010 */ |
92 | ((buf[0]&0x20)>>5); /* 0000 0001 */ | 94 | ((buf[0]&0x20)>>5); /* 0000 0001 */ |
93 | 95 | ||
94 | dprintk("ir hauppauge (em2840): code=0x%02x (rcv=0x%02x)\n",code,buf[0]); | 96 | dprintk("ir hauppauge (em2840): code=0x%02x (rcv=0x%02x)\n", |
97 | code, buf[0]); | ||
95 | 98 | ||
96 | /* return key */ | 99 | /* return key */ |
97 | *ir_key = code; | 100 | *ir_key = code; |
@@ -106,15 +109,14 @@ int em28xx_get_key_pinnacle_usb_grey(struct IR_i2c *ir, u32 *ir_key, | |||
106 | 109 | ||
107 | /* poll IR chip */ | 110 | /* poll IR chip */ |
108 | 111 | ||
109 | if (3 != i2c_master_recv(&ir->c,buf,3)) { | 112 | if (3 != i2c_master_recv(&ir->c, buf, 3)) { |
110 | dprintk("read error\n"); | 113 | dprintk("read error\n"); |
111 | return -EIO; | 114 | return -EIO; |
112 | } | 115 | } |
113 | 116 | ||
114 | dprintk("key %02x\n", buf[2]&0x3f); | 117 | dprintk("key %02x\n", buf[2]&0x3f); |
115 | if (buf[0]!=0x00){ | 118 | if (buf[0] != 0x00) |
116 | return 0; | 119 | return 0; |
117 | } | ||
118 | 120 | ||
119 | *ir_key = buf[2]&0x3f; | 121 | *ir_key = buf[2]&0x3f; |
120 | *ir_raw = buf[2]&0x3f; | 122 | *ir_raw = buf[2]&0x3f; |