diff options
author | Adrian Bunk <bunk@kernel.org> | 2008-04-25 18:06:03 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-26 08:29:57 -0400 |
commit | b33d24c4cc14ee40d83a7e1ea0bfb9567d6059aa (patch) | |
tree | 4486546bbc7141bd3ad3b174e7c7c749a13174db /drivers | |
parent | b9ef6bbbbeaf65c6a452fe3c75c196f86e0d984d (diff) |
V4L/DVB (7750): au0828/ cleanups and fixes
This patch contains the following cleanups and fixes:
- "debug" is definitely not a good name for a global variable,
renamed it to "au0828_debug"
this fixes a compile error with some kernel configurations
- since the module parameter is int the variable shouldn't be unsigned
- remove the {usb,bridge,i2c}_debug module parameters since they are
already covered by the "debug" module parameter
- remove the unused au0828_bcount
- make the needlessly global i2c_scan static
- make the needlessly global dvb_register() static
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/au0828/au0828-cards.c | 1 | ||||
-rw-r--r-- | drivers/media/video/au0828/au0828-core.c | 26 | ||||
-rw-r--r-- | drivers/media/video/au0828/au0828-dvb.c | 2 | ||||
-rw-r--r-- | drivers/media/video/au0828/au0828-i2c.c | 6 | ||||
-rw-r--r-- | drivers/media/video/au0828/au0828.h | 8 |
5 files changed, 10 insertions, 33 deletions
diff --git a/drivers/media/video/au0828/au0828-cards.c b/drivers/media/video/au0828/au0828-cards.c index 8ca91f814277..a2a6983444fa 100644 --- a/drivers/media/video/au0828/au0828-cards.c +++ b/drivers/media/video/au0828/au0828-cards.c | |||
@@ -36,7 +36,6 @@ struct au0828_board au0828_boards[] = { | |||
36 | .name = "DViCO FusionHDTV USB", | 36 | .name = "DViCO FusionHDTV USB", |
37 | }, | 37 | }, |
38 | }; | 38 | }; |
39 | const unsigned int au0828_bcount = ARRAY_SIZE(au0828_boards); | ||
40 | 39 | ||
41 | /* Tuner callback function for au0828 boards. Currently only needed | 40 | /* Tuner callback function for au0828 boards. Currently only needed |
42 | * for HVR1500Q, which has an xc5000 tuner. | 41 | * for HVR1500Q, which has an xc5000 tuner. |
diff --git a/drivers/media/video/au0828/au0828-core.c b/drivers/media/video/au0828/au0828-core.c index e65d5642cb1d..54bfc0f05295 100644 --- a/drivers/media/video/au0828/au0828-core.c +++ b/drivers/media/video/au0828/au0828-core.c | |||
@@ -32,18 +32,10 @@ | |||
32 | * 4 = I2C related | 32 | * 4 = I2C related |
33 | * 8 = Bridge related | 33 | * 8 = Bridge related |
34 | */ | 34 | */ |
35 | unsigned int debug; | 35 | int au0828_debug; |
36 | module_param(debug, int, 0644); | 36 | module_param_named(debug, au0828_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; | ||
40 | module_param(usb_debug, int, 0644); | ||
41 | MODULE_PARM_DESC(usb_debug, "enable usb debug messages"); | ||
42 | |||
43 | unsigned int bridge_debug; | ||
44 | module_param(bridge_debug, int, 0644); | ||
45 | MODULE_PARM_DESC(bridge_debug, "enable bridge debug messages"); | ||
46 | |||
47 | #define _AU0828_BULKPIPE 0x03 | 39 | #define _AU0828_BULKPIPE 0x03 |
48 | #define _BULKPIPESIZE 0xffff | 40 | #define _BULKPIPESIZE 0xffff |
49 | 41 | ||
@@ -229,24 +221,18 @@ static int __init au0828_init(void) | |||
229 | { | 221 | { |
230 | int ret; | 222 | int ret; |
231 | 223 | ||
232 | if (debug) | 224 | if (au0828_debug & 1) |
233 | printk(KERN_INFO "%s() Debugging is enabled\n", __func__); | 225 | printk(KERN_INFO "%s() Debugging is enabled\n", __func__); |
234 | 226 | ||
235 | if (usb_debug) { | 227 | if (au0828_debug & 2) |
236 | printk(KERN_INFO "%s() USB Debugging is enabled\n", __func__); | 228 | printk(KERN_INFO "%s() USB Debugging is enabled\n", __func__); |
237 | debug |= 2; | ||
238 | } | ||
239 | 229 | ||
240 | if (i2c_debug) { | 230 | if (au0828_debug & 4) |
241 | printk(KERN_INFO "%s() I2C Debugging is enabled\n", __func__); | 231 | printk(KERN_INFO "%s() I2C Debugging is enabled\n", __func__); |
242 | debug |= 4; | ||
243 | } | ||
244 | 232 | ||
245 | if (bridge_debug) { | 233 | if (au0828_debug & 8) |
246 | printk(KERN_INFO "%s() Bridge Debugging is enabled\n", | 234 | printk(KERN_INFO "%s() Bridge Debugging is enabled\n", |
247 | __func__); | 235 | __func__); |
248 | debug |= 8; | ||
249 | } | ||
250 | 236 | ||
251 | printk(KERN_INFO "au0828 driver loaded\n"); | 237 | printk(KERN_INFO "au0828 driver loaded\n"); |
252 | 238 | ||
diff --git a/drivers/media/video/au0828/au0828-dvb.c b/drivers/media/video/au0828/au0828-dvb.c index 85d0ae9a322f..5040d7fc4af5 100644 --- a/drivers/media/video/au0828/au0828-dvb.c +++ b/drivers/media/video/au0828/au0828-dvb.c | |||
@@ -204,7 +204,7 @@ static int au0828_dvb_stop_feed(struct dvb_demux_feed *feed) | |||
204 | return ret; | 204 | return ret; |
205 | } | 205 | } |
206 | 206 | ||
207 | int dvb_register(struct au0828_dev *dev) | 207 | static int dvb_register(struct au0828_dev *dev) |
208 | { | 208 | { |
209 | struct au0828_dvb *dvb = &dev->dvb; | 209 | struct au0828_dvb *dvb = &dev->dvb; |
210 | int result; | 210 | int result; |
diff --git a/drivers/media/video/au0828/au0828-i2c.c b/drivers/media/video/au0828/au0828-i2c.c index 94c8b74a6651..741a4937b050 100644 --- a/drivers/media/video/au0828/au0828-i2c.c +++ b/drivers/media/video/au0828/au0828-i2c.c | |||
@@ -29,11 +29,7 @@ | |||
29 | 29 | ||
30 | #include <media/v4l2-common.h> | 30 | #include <media/v4l2-common.h> |
31 | 31 | ||
32 | unsigned int i2c_debug; | 32 | static int i2c_scan; |
33 | module_param(i2c_debug, int, 0444); | ||
34 | MODULE_PARM_DESC(i2c_debug, "enable debug messages [i2c]"); | ||
35 | |||
36 | unsigned int i2c_scan; | ||
37 | module_param(i2c_scan, int, 0444); | 33 | module_param(i2c_scan, int, 0444); |
38 | MODULE_PARM_DESC(i2c_scan, "scan i2c bus at insmod time"); | 34 | MODULE_PARM_DESC(i2c_scan, "scan i2c bus at insmod time"); |
39 | 35 | ||
diff --git a/drivers/media/video/au0828/au0828.h b/drivers/media/video/au0828/au0828.h index 0200b9fc5dc4..7beb571798e5 100644 --- a/drivers/media/video/au0828/au0828.h +++ b/drivers/media/video/au0828/au0828.h | |||
@@ -96,15 +96,12 @@ struct au0828_buff { | |||
96 | /* au0828-core.c */ | 96 | /* au0828-core.c */ |
97 | extern u32 au0828_read(struct au0828_dev *dev, u16 reg); | 97 | extern u32 au0828_read(struct au0828_dev *dev, u16 reg); |
98 | extern u32 au0828_write(struct au0828_dev *dev, u16 reg, u32 val); | 98 | extern u32 au0828_write(struct au0828_dev *dev, u16 reg, u32 val); |
99 | extern unsigned int debug; | 99 | extern int au0828_debug; |
100 | extern unsigned int usb_debug; | ||
101 | extern unsigned int bridge_debug; | ||
102 | 100 | ||
103 | /* ----------------------------------------------------------- */ | 101 | /* ----------------------------------------------------------- */ |
104 | /* au0828-cards.c */ | 102 | /* au0828-cards.c */ |
105 | extern struct au0828_board au0828_boards[]; | 103 | extern struct au0828_board au0828_boards[]; |
106 | extern struct usb_device_id au0828_usb_id_table[]; | 104 | extern struct usb_device_id au0828_usb_id_table[]; |
107 | extern const unsigned int au0828_bcount; | ||
108 | extern void au0828_gpio_setup(struct au0828_dev *dev); | 105 | extern void au0828_gpio_setup(struct au0828_dev *dev); |
109 | extern int au0828_tuner_callback(void *priv, int command, int arg); | 106 | extern int au0828_tuner_callback(void *priv, int command, int arg); |
110 | extern void au0828_card_setup(struct au0828_dev *dev); | 107 | extern void au0828_card_setup(struct au0828_dev *dev); |
@@ -115,7 +112,6 @@ extern int au0828_i2c_register(struct au0828_dev *dev); | |||
115 | extern int au0828_i2c_unregister(struct au0828_dev *dev); | 112 | extern int au0828_i2c_unregister(struct au0828_dev *dev); |
116 | extern void au0828_call_i2c_clients(struct au0828_dev *dev, | 113 | extern void au0828_call_i2c_clients(struct au0828_dev *dev, |
117 | unsigned int cmd, void *arg); | 114 | unsigned int cmd, void *arg); |
118 | extern unsigned int i2c_debug; | ||
119 | 115 | ||
120 | /* ----------------------------------------------------------- */ | 116 | /* ----------------------------------------------------------- */ |
121 | /* au0828-dvb.c */ | 117 | /* au0828-dvb.c */ |
@@ -123,6 +119,6 @@ extern int au0828_dvb_register(struct au0828_dev *dev); | |||
123 | extern void au0828_dvb_unregister(struct au0828_dev *dev); | 119 | extern void au0828_dvb_unregister(struct au0828_dev *dev); |
124 | 120 | ||
125 | #define dprintk(level, fmt, arg...)\ | 121 | #define dprintk(level, fmt, arg...)\ |
126 | do { if (debug & level)\ | 122 | do { if (au0828_debug & level)\ |
127 | printk(KERN_DEBUG DRIVER_NAME "/0: " fmt, ## arg);\ | 123 | printk(KERN_DEBUG DRIVER_NAME "/0: " fmt, ## arg);\ |
128 | } while (0) | 124 | } while (0) |