aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-04-18 20:42:30 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 13:09:43 -0400
commitf07e8e4bb790f6cb462d5d5425193cad874ac0de (patch)
tree904759efada2d55794af274e530623491f539c96 /drivers
parentfdfc7452f17eb65eb29a143cf992ea2b8d262c7a (diff)
V4L/DVB (7627): au0828: replace __FUNCTION__ with __func__
replace __FUNCTION__ with __func__ and clean associated checkpatch.pl warnings. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/au0828/au0828-cards.c14
-rw-r--r--drivers/media/video/au0828/au0828-core.c28
-rw-r--r--drivers/media/video/au0828/au0828-dvb.c46
-rw-r--r--drivers/media/video/au0828/au0828-i2c.c10
4 files changed, 51 insertions, 47 deletions
diff --git a/drivers/media/video/au0828/au0828-cards.c b/drivers/media/video/au0828/au0828-cards.c
index eafdc552a9fa..5c9c3aea99d4 100644
--- a/drivers/media/video/au0828/au0828-cards.c
+++ b/drivers/media/video/au0828/au0828-cards.c
@@ -45,7 +45,7 @@ int au0828_tuner_callback(void *priv, int command, int arg)
45{ 45{
46 struct au0828_dev *dev = priv; 46 struct au0828_dev *dev = priv;
47 47
48 dprintk(1, "%s()\n", __FUNCTION__); 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:
@@ -62,7 +62,7 @@ int au0828_tuner_callback(void *priv, int command, int arg)
62 } 62 }
63 else { 63 else {
64 printk(KERN_ERR 64 printk(KERN_ERR
65 "%s(): Unknown command.\n", __FUNCTION__); 65 "%s(): Unknown command.\n", __func__);
66 return -EINVAL; 66 return -EINVAL;
67 } 67 }
68 break; 68 break;
@@ -83,11 +83,13 @@ static void hauppauge_eeprom(struct au0828_dev *dev, u8 *eeprom_data)
83 case 72001: /* WinTV-HVR950q (Retail, IR, ATSC/QAM and basic analog video */ 83 case 72001: /* WinTV-HVR950q (Retail, IR, ATSC/QAM and basic analog video */
84 break; 84 break;
85 default: 85 default:
86 printk("%s: warning: unknown hauppauge model #%d\n", __FUNCTION__, tv.model); 86 printk(KERN_WARNING "%s: warning: "
87 "unknown hauppauge model #%d\n", __func__, tv.model);
87 break; 88 break;
88 } 89 }
89 90
90 printk(KERN_INFO "%s: hauppauge eeprom: model=%d\n", __FUNCTION__, tv.model); 91 printk(KERN_INFO "%s: hauppauge eeprom: model=%d\n",
92 __func__, tv.model);
91} 93}
92 94
93 95
@@ -95,7 +97,7 @@ void au0828_card_setup(struct au0828_dev *dev)
95{ 97{
96 static u8 eeprom[256]; 98 static u8 eeprom[256];
97 99
98 dprintk(1, "%s()\n", __FUNCTION__); 100 dprintk(1, "%s()\n", __func__);
99 101
100 if (dev->i2c_rc == 0) { 102 if (dev->i2c_rc == 0) {
101 dev->i2c_client.addr = 0xa0 >> 1; 103 dev->i2c_client.addr = 0xa0 >> 1;
@@ -118,7 +120,7 @@ void au0828_card_setup(struct au0828_dev *dev)
118 */ 120 */
119void au0828_gpio_setup(struct au0828_dev *dev) 121void au0828_gpio_setup(struct au0828_dev *dev)
120{ 122{
121 dprintk(1, "%s()\n", __FUNCTION__); 123 dprintk(1, "%s()\n", __func__);
122 124
123 switch(dev->board) { 125 switch(dev->board) {
124 case AU0828_BOARD_HAUPPAUGE_HVR850: 126 case AU0828_BOARD_HAUPPAUGE_HVR850:
diff --git a/drivers/media/video/au0828/au0828-core.c b/drivers/media/video/au0828/au0828-core.c
index 76801d135f2a..efecac3979ae 100644
--- a/drivers/media/video/au0828/au0828-core.c
+++ b/drivers/media/video/au0828/au0828-core.c
@@ -59,13 +59,13 @@ static int recv_control_msg(struct au0828_dev *dev, u16 request, u32 value,
59u32 au0828_readreg(struct au0828_dev *dev, u16 reg) 59u32 au0828_readreg(struct au0828_dev *dev, u16 reg)
60{ 60{
61 recv_control_msg(dev, CMD_REQUEST_IN, 0, reg, dev->ctrlmsg, 1); 61 recv_control_msg(dev, CMD_REQUEST_IN, 0, reg, dev->ctrlmsg, 1);
62 dprintk(8, "%s(0x%x) = 0x%x\n", __FUNCTION__, reg, dev->ctrlmsg[0]); 62 dprintk(8, "%s(0x%x) = 0x%x\n", __func__, reg, dev->ctrlmsg[0]);
63 return dev->ctrlmsg[0]; 63 return dev->ctrlmsg[0];
64} 64}
65 65
66u32 au0828_writereg(struct au0828_dev *dev, u16 reg, u32 val) 66u32 au0828_writereg(struct au0828_dev *dev, u16 reg, u32 val)
67{ 67{
68 dprintk(8, "%s(0x%x, 0x%x)\n", __FUNCTION__, 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, dev->ctrlmsg, 0);
70} 70}
71 71
@@ -76,7 +76,7 @@ static void cmd_msg_dump(struct au0828_dev *dev)
76 for (i = 0;i < sizeof(dev->ctrlmsg); i+=16) 76 for (i = 0;i < sizeof(dev->ctrlmsg); i+=16)
77 dprintk(2,"%s() %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x " 77 dprintk(2,"%s() %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x "
78 "%02x %02x %02x %02x %02x %02x\n", 78 "%02x %02x %02x %02x %02x %02x\n",
79 __FUNCTION__, 79 __func__,
80 dev->ctrlmsg[i+0], dev->ctrlmsg[i+1], 80 dev->ctrlmsg[i+0], dev->ctrlmsg[i+1],
81 dev->ctrlmsg[i+2], dev->ctrlmsg[i+3], 81 dev->ctrlmsg[i+2], dev->ctrlmsg[i+3],
82 dev->ctrlmsg[i+4], dev->ctrlmsg[i+5], 82 dev->ctrlmsg[i+4], dev->ctrlmsg[i+5],
@@ -106,8 +106,7 @@ static int send_control_msg(struct au0828_dev *dev, u16 request, u32 value,
106 106
107 if (status < 0) { 107 if (status < 0) {
108 printk(KERN_ERR "%s() Failed sending control message, error %d.\n", 108 printk(KERN_ERR "%s() Failed sending control message, error %d.\n",
109 __FUNCTION__, 109 __func__, status);
110 status);
111 } 110 }
112 111
113 } 112 }
@@ -136,8 +135,7 @@ static int recv_control_msg(struct au0828_dev *dev, u16 request, u32 value,
136 135
137 if (status < 0) { 136 if (status < 0) {
138 printk(KERN_ERR "%s() Failed receiving control message, error %d.\n", 137 printk(KERN_ERR "%s() Failed receiving control message, error %d.\n",
139 __FUNCTION__, 138 __func__, status);
140 status);
141 } 139 }
142 else 140 else
143 cmd_msg_dump(dev); 141 cmd_msg_dump(dev);
@@ -149,7 +147,7 @@ static void au0828_usb_disconnect(struct usb_interface *interface)
149{ 147{
150 struct au0828_dev *dev = usb_get_intfdata(interface); 148 struct au0828_dev *dev = usb_get_intfdata(interface);
151 149
152 dprintk(1,"%s()\n", __FUNCTION__); 150 dprintk(1, "%s()\n", __func__);
153 151
154 /* Digital TV */ 152 /* Digital TV */
155 au0828_dvb_unregister(dev); 153 au0828_dvb_unregister(dev);
@@ -179,15 +177,14 @@ static int au0828_usb_probe (struct usb_interface *interface,
179 if (ifnum != 0) 177 if (ifnum != 0)
180 return -ENODEV; 178 return -ENODEV;
181 179
182 dprintk(1,"%s() vendor id 0x%x device id 0x%x ifnum:%d\n", 180 dprintk(1,"%s() vendor id 0x%x device id 0x%x ifnum:%d\n", __func__,
183 __FUNCTION__,
184 le16_to_cpu(usbdev->descriptor.idVendor), 181 le16_to_cpu(usbdev->descriptor.idVendor),
185 le16_to_cpu(usbdev->descriptor.idProduct), 182 le16_to_cpu(usbdev->descriptor.idProduct),
186 ifnum); 183 ifnum);
187 184
188 dev = kzalloc(sizeof(*dev), GFP_KERNEL); 185 dev = kzalloc(sizeof(*dev), GFP_KERNEL);
189 if (dev == NULL) { 186 if (dev == NULL) {
190 printk(KERN_ERR "%s() Unable to allocate memory\n", __FUNCTION__); 187 printk(KERN_ERR "%s() Unable to allocate memory\n", __func__);
191 return -ENOMEM; 188 return -ENOMEM;
192 } 189 }
193 190
@@ -232,20 +229,21 @@ static int __init au0828_init(void)
232 int ret; 229 int ret;
233 230
234 if(debug) 231 if(debug)
235 printk(KERN_INFO "%s() Debugging is enabled\n", __FUNCTION__); 232 printk(KERN_INFO "%s() Debugging is enabled\n", __func__);
236 233
237 if(usb_debug) { 234 if(usb_debug) {
238 printk(KERN_INFO "%s() USB Debugging is enabled\n", __FUNCTION__); 235 printk(KERN_INFO "%s() USB Debugging is enabled\n", __func__);
239 debug |= 2; 236 debug |= 2;
240 } 237 }
241 238
242 if(i2c_debug) { 239 if(i2c_debug) {
243 printk(KERN_INFO "%s() I2C Debugging is enabled\n", __FUNCTION__); 240 printk(KERN_INFO "%s() I2C Debugging is enabled\n", __func__);
244 debug |= 4; 241 debug |= 4;
245 } 242 }
246 243
247 if(bridge_debug) { 244 if(bridge_debug) {
248 printk(KERN_INFO "%s() Bridge Debugging is enabled\n", __FUNCTION__); 245 printk(KERN_INFO "%s() Bridge Debugging is enabled\n",
246 __func__);
249 debug |= 8; 247 debug |= 8;
250 } 248 }
251 249
diff --git a/drivers/media/video/au0828/au0828-dvb.c b/drivers/media/video/au0828/au0828-dvb.c
index 453fb3efa3e0..8853f4e26092 100644
--- a/drivers/media/video/au0828/au0828-dvb.c
+++ b/drivers/media/video/au0828/au0828-dvb.c
@@ -49,7 +49,7 @@ static void urb_completion(struct urb *purb)
49 struct au0828_dev *dev = purb->context; 49 struct au0828_dev *dev = purb->context;
50 int ptype = usb_pipetype(purb->pipe); 50 int ptype = usb_pipetype(purb->pipe);
51 51
52 dprintk(2, "%s()\n", __FUNCTION__); 52 dprintk(2, "%s()\n", __func__);
53 53
54 if (!dev) 54 if (!dev)
55 return; 55 return;
@@ -58,7 +58,8 @@ static void urb_completion(struct urb *purb)
58 return; 58 return;
59 59
60 if (ptype != PIPE_BULK) { 60 if (ptype != PIPE_BULK) {
61 printk(KERN_ERR "%s() Unsupported URB type %d\n", __FUNCTION__, ptype); 61 printk(KERN_ERR "%s() Unsupported URB type %d\n",
62 __func__, ptype);
62 return; 63 return;
63 } 64 }
64 65
@@ -78,7 +79,7 @@ static int stop_urb_transfer(struct au0828_dev *dev)
78{ 79{
79 int i; 80 int i;
80 81
81 dprintk(2, "%s()\n", __FUNCTION__); 82 dprintk(2, "%s()\n", __func__);
82 83
83 /* FIXME: Do we need to free the transfer_buffers? */ 84 /* FIXME: Do we need to free the transfer_buffers? */
84 for (i = 0; i < URB_COUNT; i++) { 85 for (i = 0; i < URB_COUNT; i++) {
@@ -100,10 +101,10 @@ static int start_urb_transfer(struct au0828_dev *dev)
100 struct urb *purb; 101 struct urb *purb;
101 int i, ret = -ENOMEM; 102 int i, ret = -ENOMEM;
102 103
103 dprintk(2, "%s()\n", __FUNCTION__); 104 dprintk(2, "%s()\n", __func__);
104 105
105 if (dev->urb_streaming) { 106 if (dev->urb_streaming) {
106 dprintk(2, "%s: iso xfer already running!\n", __FUNCTION__); 107 dprintk(2, "%s: iso xfer already running!\n", __func__);
107 return 0; 108 return 0;
108 } 109 }
109 110
@@ -138,7 +139,8 @@ static int start_urb_transfer(struct au0828_dev *dev)
138 ret = usb_submit_urb(dev->urbs[i], GFP_ATOMIC); 139 ret = usb_submit_urb(dev->urbs[i], GFP_ATOMIC);
139 if (ret != 0) { 140 if (ret != 0) {
140 stop_urb_transfer(dev); 141 stop_urb_transfer(dev);
141 printk("%s: failed urb submission, err = %d\n", __FUNCTION__, ret); 142 printk(KERN_ERR "%s: failed urb submission, "
143 "err = %d\n", __func__, ret);
142 return ret; 144 return ret;
143 } 145 }
144 } 146 }
@@ -157,7 +159,7 @@ static int au0828_dvb_start_feed(struct dvb_demux_feed *feed)
157 struct au0828_dvb *dvb = &dev->dvb; 159 struct au0828_dvb *dvb = &dev->dvb;
158 int ret = 0; 160 int ret = 0;
159 161
160 dprintk(1, "%s()\n", __FUNCTION__); 162 dprintk(1, "%s()\n", __func__);
161 163
162 if (!demux->dmx.frontend) 164 if (!demux->dmx.frontend)
163 return -EINVAL; 165 return -EINVAL;
@@ -185,7 +187,7 @@ static int au0828_dvb_stop_feed(struct dvb_demux_feed *feed)
185 struct au0828_dvb *dvb = &dev->dvb; 187 struct au0828_dvb *dvb = &dev->dvb;
186 int ret = 0; 188 int ret = 0;
187 189
188 dprintk(1, "%s()\n", __FUNCTION__); 190 dprintk(1, "%s()\n", __func__);
189 191
190 if (dvb) { 192 if (dvb) {
191 mutex_lock(&dvb->lock); 193 mutex_lock(&dvb->lock);
@@ -208,14 +210,14 @@ int dvb_register(struct au0828_dev *dev)
208 struct au0828_dvb *dvb = &dev->dvb; 210 struct au0828_dvb *dvb = &dev->dvb;
209 int result; 211 int result;
210 212
211 dprintk(1, "%s()\n", __FUNCTION__); 213 dprintk(1, "%s()\n", __func__);
212 214
213 /* register adapter */ 215 /* register adapter */
214 result = dvb_register_adapter(&dvb->adapter, DRIVER_NAME, THIS_MODULE, 216 result = dvb_register_adapter(&dvb->adapter, DRIVER_NAME, THIS_MODULE,
215 &dev->usbdev->dev, adapter_nr); 217 &dev->usbdev->dev, adapter_nr);
216 if (result < 0) { 218 if (result < 0) {
217 printk(KERN_ERROR "%s: dvb_register_adapter failed (errno = %d)\n", 219 printk(KERN_ERR "%s: dvb_register_adapter failed "
218 DRIVER_NAME, result); 220 "(errno = %d)\n", DRIVER_NAME, result);
219 goto fail_adapter; 221 goto fail_adapter;
220 } 222 }
221 dvb->adapter.priv = dev; 223 dvb->adapter.priv = dev;
@@ -223,8 +225,8 @@ int dvb_register(struct au0828_dev *dev)
223 /* register frontend */ 225 /* register frontend */
224 result = dvb_register_frontend(&dvb->adapter, dvb->frontend); 226 result = dvb_register_frontend(&dvb->adapter, dvb->frontend);
225 if (result < 0) { 227 if (result < 0) {
226 printk(KERN_ERR "%s: dvb_register_frontend failed (errno = %d)\n", 228 printk(KERN_ERR "%s: dvb_register_frontend failed "
227 DRIVER_NAME, result); 229 "(errno = %d)\n", DRIVER_NAME, result);
228 goto fail_frontend; 230 goto fail_frontend;
229 } 231 }
230 232
@@ -257,16 +259,16 @@ int dvb_register(struct au0828_dev *dev)
257 dvb->fe_hw.source = DMX_FRONTEND_0; 259 dvb->fe_hw.source = DMX_FRONTEND_0;
258 result = dvb->demux.dmx.add_frontend(&dvb->demux.dmx, &dvb->fe_hw); 260 result = dvb->demux.dmx.add_frontend(&dvb->demux.dmx, &dvb->fe_hw);
259 if (result < 0) { 261 if (result < 0) {
260 printk(KERN_ERR "%s: add_frontend failed (DMX_FRONTEND_0, errno = %d)\n", 262 printk(KERN_ERR "%s: add_frontend failed "
261 DRIVER_NAME, result); 263 "(DMX_FRONTEND_0, errno = %d)\n", DRIVER_NAME, result);
262 goto fail_fe_hw; 264 goto fail_fe_hw;
263 } 265 }
264 266
265 dvb->fe_mem.source = DMX_MEMORY_FE; 267 dvb->fe_mem.source = DMX_MEMORY_FE;
266 result = dvb->demux.dmx.add_frontend(&dvb->demux.dmx, &dvb->fe_mem); 268 result = dvb->demux.dmx.add_frontend(&dvb->demux.dmx, &dvb->fe_mem);
267 if (result < 0) { 269 if (result < 0) {
268 printk(KERN_ERR "%s: add_frontend failed (DMX_MEMORY_FE, errno = %d)\n", 270 printk(KERN_ERR "%s: add_frontend failed "
269 DRIVER_NAME, result); 271 "(DMX_MEMORY_FE, errno = %d)\n", DRIVER_NAME, result);
270 goto fail_fe_mem; 272 goto fail_fe_mem;
271 } 273 }
272 274
@@ -302,7 +304,7 @@ void au0828_dvb_unregister(struct au0828_dev *dev)
302{ 304{
303 struct au0828_dvb *dvb = &dev->dvb; 305 struct au0828_dvb *dvb = &dev->dvb;
304 306
305 dprintk(1, "%s()\n", __FUNCTION__); 307 dprintk(1, "%s()\n", __func__);
306 308
307 if(dvb->frontend == NULL) 309 if(dvb->frontend == NULL)
308 return; 310 return;
@@ -326,7 +328,7 @@ int au0828_dvb_register(struct au0828_dev *dev)
326 struct au0828_dvb *dvb = &dev->dvb; 328 struct au0828_dvb *dvb = &dev->dvb;
327 int ret; 329 int ret;
328 330
329 dprintk(1, "%s()\n", __FUNCTION__); 331 dprintk(1, "%s()\n", __func__);
330 332
331 /* init frontend */ 333 /* init frontend */
332 switch (dev->board) { 334 switch (dev->board) {
@@ -344,11 +346,13 @@ int au0828_dvb_register(struct au0828_dev *dev)
344 } 346 }
345 break; 347 break;
346 default: 348 default:
347 printk("The frontend of your DVB/ATSC card isn't supported yet\n"); 349 printk(KERN_WARNING "The frontend of your DVB/ATSC card "
350 "isn't supported yet\n");
348 break; 351 break;
349 } 352 }
350 if (NULL == dvb->frontend) { 353 if (NULL == dvb->frontend) {
351 printk(KERN_ERR "%s() Frontend initialization failed\n", __FUNCTION__); 354 printk(KERN_ERR "%s() Frontend initialization failed\n",
355 __func__);
352 return -1; 356 return -1;
353 } 357 }
354 358
diff --git a/drivers/media/video/au0828/au0828-i2c.c b/drivers/media/video/au0828/au0828-i2c.c
index 4545a9cbaa6d..c1e1cf6ed95a 100644
--- a/drivers/media/video/au0828/au0828-i2c.c
+++ b/drivers/media/video/au0828/au0828-i2c.c
@@ -141,7 +141,7 @@ static int i2c_sendbytes(struct i2c_adapter *i2c_adap,
141 int i, strobe = 0; 141 int i, strobe = 0;
142 struct au0828_dev *dev = i2c_adap->algo_data; 142 struct au0828_dev *dev = i2c_adap->algo_data;
143 143
144 dprintk(4, "%s()\n", __FUNCTION__); 144 dprintk(4, "%s()\n", __func__);
145 145
146 au0828_write(dev, REG_2FF, 0x01); 146 au0828_write(dev, REG_2FF, 0x01);
147 au0828_write(dev, REG_202, 0x07); 147 au0828_write(dev, REG_202, 0x07);
@@ -192,7 +192,7 @@ static int i2c_readbytes(struct i2c_adapter *i2c_adap,
192 struct au0828_dev *dev = i2c_adap->algo_data; 192 struct au0828_dev *dev = i2c_adap->algo_data;
193 int i; 193 int i;
194 194
195 dprintk(4, "%s()\n", __FUNCTION__); 195 dprintk(4, "%s()\n", __func__);
196 196
197 au0828_write(dev, REG_2FF, 0x01); 197 au0828_write(dev, REG_2FF, 0x01);
198 au0828_write(dev, REG_202, 0x07); 198 au0828_write(dev, REG_202, 0x07);
@@ -239,11 +239,11 @@ static int i2c_xfer(struct i2c_adapter *i2c_adap,
239{ 239{
240 int i, retval = 0; 240 int i, retval = 0;
241 241
242 dprintk(4, "%s(num = %d)\n", __FUNCTION__, num); 242 dprintk(4, "%s(num = %d)\n", __func__, num);
243 243
244 for (i = 0 ; i < num; i++) { 244 for (i = 0 ; i < num; i++) {
245 dprintk(4, "%s(num = %d) addr = 0x%02x len = 0x%x\n", 245 dprintk(4, "%s(num = %d) addr = 0x%02x len = 0x%x\n",
246 __FUNCTION__, num, msgs[i].addr, msgs[i].len); 246 __func__, num, msgs[i].addr, msgs[i].len);
247 if (msgs[i].flags & I2C_M_RD) { 247 if (msgs[i].flags & I2C_M_RD) {
248 /* read */ 248 /* read */
249 retval = i2c_readbytes(i2c_adap, &msgs[i], 0); 249 retval = i2c_readbytes(i2c_adap, &msgs[i], 0);
@@ -346,7 +346,7 @@ static void do_i2c_scan(char *name, struct i2c_client *c)
346/* init + register i2c algo-bit adapter */ 346/* init + register i2c algo-bit adapter */
347int au0828_i2c_register(struct au0828_dev *dev) 347int au0828_i2c_register(struct au0828_dev *dev)
348{ 348{
349 dprintk(1, "%s()\n", __FUNCTION__); 349 dprintk(1, "%s()\n", __func__);
350 350
351 memcpy(&dev->i2c_adap, &au0828_i2c_adap_template, 351 memcpy(&dev->i2c_adap, &au0828_i2c_adap_template,
352 sizeof(dev->i2c_adap)); 352 sizeof(dev->i2c_adap));