diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-18 21:12:52 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 13:09:43 -0400 |
commit | 18d73c58b5ea7425db05b666408f6f682d837b73 (patch) | |
tree | d071b99fdbb10abbed2c9c81ec3ea2a2519c4ffc /drivers/media/video | |
parent | bbdf855b0e98ba576b3577522af5e5c7503c4ed0 (diff) |
V4L/DVB (7638): CodingStyle fixes for au8522 and au0828
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/au0828/au0828-cards.c | 9 | ||||
-rw-r--r-- | drivers/media/video/au0828/au0828-core.c | 20 | ||||
-rw-r--r-- | drivers/media/video/au0828/au0828-dvb.c | 3 | ||||
-rw-r--r-- | drivers/media/video/au0828/au0828-i2c.c | 18 | ||||
-rw-r--r-- | drivers/media/video/au0828/au0828.h | 15 |
5 files changed, 32 insertions, 33 deletions
diff --git a/drivers/media/video/au0828/au0828-cards.c b/drivers/media/video/au0828/au0828-cards.c index 688cb8d26b30..8ca91f814277 100644 --- a/drivers/media/video/au0828/au0828-cards.c +++ b/drivers/media/video/au0828/au0828-cards.c | |||
@@ -47,7 +47,7 @@ int au0828_tuner_callback(void *priv, int command, int arg) | |||
47 | 47 | ||
48 | dprintk(1, "%s()\n", __func__); | 48 | dprintk(1, "%s()\n", __func__); |
49 | 49 | ||
50 | switch(dev->board) { | 50 | switch (dev->board) { |
51 | case AU0828_BOARD_HAUPPAUGE_HVR850: | 51 | case AU0828_BOARD_HAUPPAUGE_HVR850: |
52 | case AU0828_BOARD_HAUPPAUGE_HVR950Q: | 52 | case AU0828_BOARD_HAUPPAUGE_HVR950Q: |
53 | case AU0828_BOARD_DVICO_FUSIONHDTV7: | 53 | case AU0828_BOARD_DVICO_FUSIONHDTV7: |
@@ -59,8 +59,7 @@ int au0828_tuner_callback(void *priv, int command, int arg) | |||
59 | au0828_set(dev, REG_001, 2); | 59 | au0828_set(dev, REG_001, 2); |
60 | mdelay(50); | 60 | mdelay(50); |
61 | return 0; | 61 | return 0; |
62 | } | 62 | } else { |
63 | else { | ||
64 | printk(KERN_ERR | 63 | printk(KERN_ERR |
65 | "%s(): Unknown command.\n", __func__); | 64 | "%s(): Unknown command.\n", __func__); |
66 | return -EINVAL; | 65 | return -EINVAL; |
@@ -103,7 +102,7 @@ void au0828_card_setup(struct au0828_dev *dev) | |||
103 | tveeprom_read(&dev->i2c_client, eeprom, sizeof(eeprom)); | 102 | tveeprom_read(&dev->i2c_client, eeprom, sizeof(eeprom)); |
104 | } | 103 | } |
105 | 104 | ||
106 | switch(dev->board) { | 105 | switch (dev->board) { |
107 | case AU0828_BOARD_HAUPPAUGE_HVR850: | 106 | case AU0828_BOARD_HAUPPAUGE_HVR850: |
108 | case AU0828_BOARD_HAUPPAUGE_HVR950Q: | 107 | case AU0828_BOARD_HAUPPAUGE_HVR950Q: |
109 | if (dev->i2c_rc == 0) | 108 | if (dev->i2c_rc == 0) |
@@ -121,7 +120,7 @@ void au0828_gpio_setup(struct au0828_dev *dev) | |||
121 | { | 120 | { |
122 | dprintk(1, "%s()\n", __func__); | 121 | dprintk(1, "%s()\n", __func__); |
123 | 122 | ||
124 | switch(dev->board) { | 123 | switch (dev->board) { |
125 | case AU0828_BOARD_HAUPPAUGE_HVR850: | 124 | case AU0828_BOARD_HAUPPAUGE_HVR850: |
126 | case AU0828_BOARD_HAUPPAUGE_HVR950Q: | 125 | case AU0828_BOARD_HAUPPAUGE_HVR950Q: |
127 | /* GPIO's | 126 | /* GPIO's |
diff --git a/drivers/media/video/au0828/au0828-core.c b/drivers/media/video/au0828/au0828-core.c index 530c675e53a4..e65d5642cb1d 100644 --- a/drivers/media/video/au0828/au0828-core.c +++ b/drivers/media/video/au0828/au0828-core.c | |||
@@ -32,15 +32,15 @@ | |||
32 | * 4 = I2C related | 32 | * 4 = I2C related |
33 | * 8 = Bridge related | 33 | * 8 = Bridge related |
34 | */ | 34 | */ |
35 | unsigned int debug = 0; | 35 | unsigned int debug; |
36 | module_param(debug, int, 0644); | 36 | module_param(debug, int, 0644); |
37 | MODULE_PARM_DESC(debug, "enable debug messages"); | 37 | MODULE_PARM_DESC(debug, "enable debug messages"); |
38 | 38 | ||
39 | unsigned int usb_debug = 0; | 39 | unsigned int usb_debug; |
40 | module_param(usb_debug, int, 0644); | 40 | module_param(usb_debug, int, 0644); |
41 | MODULE_PARM_DESC(usb_debug, "enable usb debug messages"); | 41 | MODULE_PARM_DESC(usb_debug, "enable usb debug messages"); |
42 | 42 | ||
43 | unsigned int bridge_debug = 0; | 43 | unsigned int bridge_debug; |
44 | module_param(bridge_debug, int, 0644); | 44 | module_param(bridge_debug, int, 0644); |
45 | MODULE_PARM_DESC(bridge_debug, "enable bridge debug messages"); | 45 | MODULE_PARM_DESC(bridge_debug, "enable bridge debug messages"); |
46 | 46 | ||
@@ -66,16 +66,17 @@ u32 au0828_readreg(struct au0828_dev *dev, u16 reg) | |||
66 | u32 au0828_writereg(struct au0828_dev *dev, u16 reg, u32 val) | 66 | u32 au0828_writereg(struct au0828_dev *dev, u16 reg, u32 val) |
67 | { | 67 | { |
68 | dprintk(8, "%s(0x%x, 0x%x)\n", __func__, reg, val); | 68 | dprintk(8, "%s(0x%x, 0x%x)\n", __func__, reg, val); |
69 | return send_control_msg(dev, CMD_REQUEST_OUT, val, reg, dev->ctrlmsg, 0); | 69 | return send_control_msg(dev, CMD_REQUEST_OUT, val, reg, |
70 | dev->ctrlmsg, 0); | ||
70 | } | 71 | } |
71 | 72 | ||
72 | static void cmd_msg_dump(struct au0828_dev *dev) | 73 | static void cmd_msg_dump(struct au0828_dev *dev) |
73 | { | 74 | { |
74 | int i; | 75 | int i; |
75 | 76 | ||
76 | for (i = 0;i < sizeof(dev->ctrlmsg); i+=16) | 77 | for (i = 0; i < sizeof(dev->ctrlmsg); i += 16) |
77 | dprintk(2,"%s() %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x " | 78 | dprintk(2, "%s() %02x %02x %02x %02x %02x %02x %02x %02x " |
78 | "%02x %02x %02x %02x %02x %02x\n", | 79 | "%02x %02x %02x %02x %02x %02x %02x %02x\n", |
79 | __func__, | 80 | __func__, |
80 | dev->ctrlmsg[i+0], dev->ctrlmsg[i+1], | 81 | dev->ctrlmsg[i+0], dev->ctrlmsg[i+1], |
81 | dev->ctrlmsg[i+2], dev->ctrlmsg[i+3], | 82 | dev->ctrlmsg[i+2], dev->ctrlmsg[i+3], |
@@ -136,8 +137,7 @@ static int recv_control_msg(struct au0828_dev *dev, u16 request, u32 value, | |||
136 | if (status < 0) { | 137 | if (status < 0) { |
137 | printk(KERN_ERR "%s() Failed receiving control message, error %d.\n", | 138 | printk(KERN_ERR "%s() Failed receiving control message, error %d.\n", |
138 | __func__, status); | 139 | __func__, status); |
139 | } | 140 | } else |
140 | else | ||
141 | cmd_msg_dump(dev); | 141 | cmd_msg_dump(dev); |
142 | } | 142 | } |
143 | mutex_unlock(&dev->mutex); | 143 | mutex_unlock(&dev->mutex); |
@@ -166,7 +166,7 @@ static void au0828_usb_disconnect(struct usb_interface *interface) | |||
166 | 166 | ||
167 | } | 167 | } |
168 | 168 | ||
169 | static int au0828_usb_probe (struct usb_interface *interface, | 169 | static int au0828_usb_probe(struct usb_interface *interface, |
170 | const struct usb_device_id *id) | 170 | const struct usb_device_id *id) |
171 | { | 171 | { |
172 | int ifnum; | 172 | int ifnum; |
diff --git a/drivers/media/video/au0828/au0828-dvb.c b/drivers/media/video/au0828/au0828-dvb.c index 4a27e5b41f53..85d0ae9a322f 100644 --- a/drivers/media/video/au0828/au0828-dvb.c +++ b/drivers/media/video/au0828/au0828-dvb.c | |||
@@ -111,9 +111,8 @@ static int start_urb_transfer(struct au0828_dev *dev) | |||
111 | for (i = 0; i < URB_COUNT; i++) { | 111 | for (i = 0; i < URB_COUNT; i++) { |
112 | 112 | ||
113 | dev->urbs[i] = usb_alloc_urb(0, GFP_KERNEL); | 113 | dev->urbs[i] = usb_alloc_urb(0, GFP_KERNEL); |
114 | if (!dev->urbs[i]) { | 114 | if (!dev->urbs[i]) |
115 | goto err; | 115 | goto err; |
116 | } | ||
117 | 116 | ||
118 | purb = dev->urbs[i]; | 117 | purb = dev->urbs[i]; |
119 | 118 | ||
diff --git a/drivers/media/video/au0828/au0828-i2c.c b/drivers/media/video/au0828/au0828-i2c.c index ae73a6769296..94c8b74a6651 100644 --- a/drivers/media/video/au0828/au0828-i2c.c +++ b/drivers/media/video/au0828/au0828-i2c.c | |||
@@ -23,17 +23,17 @@ | |||
23 | #include <linux/moduleparam.h> | 23 | #include <linux/moduleparam.h> |
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <asm/io.h> | 26 | #include <linux/io.h> |
27 | 27 | ||
28 | #include "au0828.h" | 28 | #include "au0828.h" |
29 | 29 | ||
30 | #include <media/v4l2-common.h> | 30 | #include <media/v4l2-common.h> |
31 | 31 | ||
32 | unsigned int i2c_debug = 0; | 32 | unsigned int i2c_debug; |
33 | module_param(i2c_debug, int, 0444); | 33 | module_param(i2c_debug, int, 0444); |
34 | MODULE_PARM_DESC(i2c_debug, "enable debug messages [i2c]"); | 34 | MODULE_PARM_DESC(i2c_debug, "enable debug messages [i2c]"); |
35 | 35 | ||
36 | unsigned int i2c_scan = 0; | 36 | unsigned int i2c_scan; |
37 | module_param(i2c_scan, int, 0444); | 37 | module_param(i2c_scan, int, 0444); |
38 | MODULE_PARM_DESC(i2c_scan, "scan i2c bus at insmod time"); | 38 | MODULE_PARM_DESC(i2c_scan, "scan i2c bus at insmod time"); |
39 | 39 | ||
@@ -323,9 +323,9 @@ static struct i2c_client au0828_i2c_client_template = { | |||
323 | }; | 323 | }; |
324 | 324 | ||
325 | static char *i2c_devs[128] = { | 325 | static char *i2c_devs[128] = { |
326 | [ 0x8e >> 1 ] = "au8522", | 326 | [0x8e >> 1] = "au8522", |
327 | [ 0xa0 >> 1 ] = "eeprom", | 327 | [0xa0 >> 1] = "eeprom", |
328 | [ 0xc2 >> 1 ] = "tuner/xc5000", | 328 | [0xc2 >> 1] = "tuner/xc5000", |
329 | }; | 329 | }; |
330 | 330 | ||
331 | static void do_i2c_scan(char *name, struct i2c_client *c) | 331 | static void do_i2c_scan(char *name, struct i2c_client *c) |
@@ -338,7 +338,7 @@ static void do_i2c_scan(char *name, struct i2c_client *c) | |||
338 | rc = i2c_master_recv(c, &buf, 0); | 338 | rc = i2c_master_recv(c, &buf, 0); |
339 | if (rc < 0) | 339 | if (rc < 0) |
340 | continue; | 340 | continue; |
341 | printk("%s: i2c scan: found device @ 0x%x [%s]\n", | 341 | printk(KERN_INFO "%s: i2c scan: found device @ 0x%x [%s]\n", |
342 | name, i << 1, i2c_devs[i] ? i2c_devs[i] : "???"); | 342 | name, i << 1, i2c_devs[i] ? i2c_devs[i] : "???"); |
343 | } | 343 | } |
344 | } | 344 | } |
@@ -368,11 +368,11 @@ int au0828_i2c_register(struct au0828_dev *dev) | |||
368 | dev->i2c_client.adapter = &dev->i2c_adap; | 368 | dev->i2c_client.adapter = &dev->i2c_adap; |
369 | 369 | ||
370 | if (0 == dev->i2c_rc) { | 370 | if (0 == dev->i2c_rc) { |
371 | printk("%s: i2c bus registered\n", DRIVER_NAME); | 371 | printk(KERN_INFO "%s: i2c bus registered\n", DRIVER_NAME); |
372 | if (i2c_scan) | 372 | if (i2c_scan) |
373 | do_i2c_scan(DRIVER_NAME, &dev->i2c_client); | 373 | do_i2c_scan(DRIVER_NAME, &dev->i2c_client); |
374 | } else | 374 | } else |
375 | printk("%s: i2c bus register FAILED\n", DRIVER_NAME); | 375 | printk(KERN_INFO "%s: i2c bus register FAILED\n", DRIVER_NAME); |
376 | 376 | ||
377 | return dev->i2c_rc; | 377 | return dev->i2c_rc; |
378 | } | 378 | } |
diff --git a/drivers/media/video/au0828/au0828.h b/drivers/media/video/au0828/au0828.h index 7e6aeb727baa..0200b9fc5dc4 100644 --- a/drivers/media/video/au0828/au0828.h +++ b/drivers/media/video/au0828/au0828.h | |||
@@ -83,13 +83,14 @@ struct au0828_buff { | |||
83 | }; | 83 | }; |
84 | 84 | ||
85 | /* ----------------------------------------------------------- */ | 85 | /* ----------------------------------------------------------- */ |
86 | #define au0828_read(dev,reg) au0828_readreg(dev,reg) | 86 | #define au0828_read(dev, reg) au0828_readreg(dev, reg) |
87 | #define au0828_write(dev,reg,value) au0828_writereg(dev,reg,value) | 87 | #define au0828_write(dev, reg, value) au0828_writereg(dev, reg, value) |
88 | #define au0828_andor(dev,reg,mask,value) \ | 88 | #define au0828_andor(dev, reg, mask, value) \ |
89 | au0828_writereg(dev,reg,(au0828_readreg(dev,reg)&~(mask))|((value)&(mask))) | 89 | au0828_writereg(dev, reg, \ |
90 | 90 | (au0828_readreg(dev, reg) & ~(mask)) | ((value) & (mask))) | |
91 | #define au0828_set(dev,reg,bit) au0828_andor(dev,(reg),(bit),(bit)) | 91 | |
92 | #define au0828_clear(dev,reg,bit) au0828_andor(dev,(reg),(bit),0) | 92 | #define au0828_set(dev, reg, bit) au0828_andor(dev, (reg), (bit), (bit)) |
93 | #define au0828_clear(dev, reg, bit) au0828_andor(dev, (reg), (bit), 0) | ||
93 | 94 | ||
94 | /* ----------------------------------------------------------- */ | 95 | /* ----------------------------------------------------------- */ |
95 | /* au0828-core.c */ | 96 | /* au0828-core.c */ |