From f07e8e4bb790f6cb462d5d5425193cad874ac0de Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Fri, 18 Apr 2008 21:42:30 -0300 Subject: [PATCH] V4L/DVB (7627): au0828: replace __FUNCTION__ with __func__ replace __FUNCTION__ with __func__ and clean associated checkpatch.pl warnings. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/au0828/au0828-cards.c | 14 ++++--- drivers/media/video/au0828/au0828-core.c | 28 +++++++------- drivers/media/video/au0828/au0828-dvb.c | 46 ++++++++++++----------- drivers/media/video/au0828/au0828-i2c.c | 10 ++--- 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 eafdc552a9..5c9c3aea99 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) { struct au0828_dev *dev = priv; - dprintk(1, "%s()\n", __FUNCTION__); + dprintk(1, "%s()\n", __func__); switch(dev->board) { case AU0828_BOARD_HAUPPAUGE_HVR850: @@ -62,7 +62,7 @@ int au0828_tuner_callback(void *priv, int command, int arg) } else { printk(KERN_ERR - "%s(): Unknown command.\n", __FUNCTION__); + "%s(): Unknown command.\n", __func__); return -EINVAL; } break; @@ -83,11 +83,13 @@ static void hauppauge_eeprom(struct au0828_dev *dev, u8 *eeprom_data) case 72001: /* WinTV-HVR950q (Retail, IR, ATSC/QAM and basic analog video */ break; default: - printk("%s: warning: unknown hauppauge model #%d\n", __FUNCTION__, tv.model); + printk(KERN_WARNING "%s: warning: " + "unknown hauppauge model #%d\n", __func__, tv.model); break; } - printk(KERN_INFO "%s: hauppauge eeprom: model=%d\n", __FUNCTION__, tv.model); + printk(KERN_INFO "%s: hauppauge eeprom: model=%d\n", + __func__, tv.model); } @@ -95,7 +97,7 @@ void au0828_card_setup(struct au0828_dev *dev) { static u8 eeprom[256]; - dprintk(1, "%s()\n", __FUNCTION__); + dprintk(1, "%s()\n", __func__); if (dev->i2c_rc == 0) { dev->i2c_client.addr = 0xa0 >> 1; @@ -118,7 +120,7 @@ void au0828_card_setup(struct au0828_dev *dev) */ void au0828_gpio_setup(struct au0828_dev *dev) { - dprintk(1, "%s()\n", __FUNCTION__); + dprintk(1, "%s()\n", __func__); switch(dev->board) { case AU0828_BOARD_HAUPPAUGE_HVR850: diff --git a/drivers/media/video/au0828/au0828-core.c b/drivers/media/video/au0828/au0828-core.c index 76801d135f..efecac3979 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, u32 au0828_readreg(struct au0828_dev *dev, u16 reg) { recv_control_msg(dev, CMD_REQUEST_IN, 0, reg, dev->ctrlmsg, 1); - dprintk(8, "%s(0x%x) = 0x%x\n", __FUNCTION__, reg, dev->ctrlmsg[0]); + dprintk(8, "%s(0x%x) = 0x%x\n", __func__, reg, dev->ctrlmsg[0]); return dev->ctrlmsg[0]; } u32 au0828_writereg(struct au0828_dev *dev, u16 reg, u32 val) { - dprintk(8, "%s(0x%x, 0x%x)\n", __FUNCTION__, reg, val); + dprintk(8, "%s(0x%x, 0x%x)\n", __func__, reg, val); return send_control_msg(dev, CMD_REQUEST_OUT, val, reg, dev->ctrlmsg, 0); } @@ -76,7 +76,7 @@ static void cmd_msg_dump(struct au0828_dev *dev) for (i = 0;i < sizeof(dev->ctrlmsg); i+=16) dprintk(2,"%s() %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x " "%02x %02x %02x %02x %02x %02x\n", - __FUNCTION__, + __func__, dev->ctrlmsg[i+0], dev->ctrlmsg[i+1], dev->ctrlmsg[i+2], dev->ctrlmsg[i+3], 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, if (status < 0) { printk(KERN_ERR "%s() Failed sending control message, error %d.\n", - __FUNCTION__, - status); + __func__, status); } } @@ -136,8 +135,7 @@ static int recv_control_msg(struct au0828_dev *dev, u16 request, u32 value, if (status < 0) { printk(KERN_ERR "%s() Failed receiving control message, error %d.\n", - __FUNCTION__, - status); + __func__, status); } else cmd_msg_dump(dev); @@ -149,7 +147,7 @@ static void au0828_usb_disconnect(struct usb_interface *interface) { struct au0828_dev *dev = usb_get_intfdata(interface); - dprintk(1,"%s()\n", __FUNCTION__); + dprintk(1, "%s()\n", __func__); /* Digital TV */ au0828_dvb_unregister(dev); @@ -179,15 +177,14 @@ static int au0828_usb_probe (struct usb_interface *interface, if (ifnum != 0) return -ENODEV; - dprintk(1,"%s() vendor id 0x%x device id 0x%x ifnum:%d\n", - __FUNCTION__, + dprintk(1,"%s() vendor id 0x%x device id 0x%x ifnum:%d\n", __func__, le16_to_cpu(usbdev->descriptor.idVendor), le16_to_cpu(usbdev->descriptor.idProduct), ifnum); dev = kzalloc(sizeof(*dev), GFP_KERNEL); if (dev == NULL) { - printk(KERN_ERR "%s() Unable to allocate memory\n", __FUNCTION__); + printk(KERN_ERR "%s() Unable to allocate memory\n", __func__); return -ENOMEM; } @@ -232,20 +229,21 @@ static int __init au0828_init(void) int ret; if(debug) - printk(KERN_INFO "%s() Debugging is enabled\n", __FUNCTION__); + printk(KERN_INFO "%s() Debugging is enabled\n", __func__); if(usb_debug) { - printk(KERN_INFO "%s() USB Debugging is enabled\n", __FUNCTION__); + printk(KERN_INFO "%s() USB Debugging is enabled\n", __func__); debug |= 2; } if(i2c_debug) { - printk(KERN_INFO "%s() I2C Debugging is enabled\n", __FUNCTION__); + printk(KERN_INFO "%s() I2C Debugging is enabled\n", __func__); debug |= 4; } if(bridge_debug) { - printk(KERN_INFO "%s() Bridge Debugging is enabled\n", __FUNCTION__); + printk(KERN_INFO "%s() Bridge Debugging is enabled\n", + __func__); debug |= 8; } diff --git a/drivers/media/video/au0828/au0828-dvb.c b/drivers/media/video/au0828/au0828-dvb.c index 453fb3efa3..8853f4e260 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) struct au0828_dev *dev = purb->context; int ptype = usb_pipetype(purb->pipe); - dprintk(2, "%s()\n", __FUNCTION__); + dprintk(2, "%s()\n", __func__); if (!dev) return; @@ -58,7 +58,8 @@ static void urb_completion(struct urb *purb) return; if (ptype != PIPE_BULK) { - printk(KERN_ERR "%s() Unsupported URB type %d\n", __FUNCTION__, ptype); + printk(KERN_ERR "%s() Unsupported URB type %d\n", + __func__, ptype); return; } @@ -78,7 +79,7 @@ static int stop_urb_transfer(struct au0828_dev *dev) { int i; - dprintk(2, "%s()\n", __FUNCTION__); + dprintk(2, "%s()\n", __func__); /* FIXME: Do we need to free the transfer_buffers? */ for (i = 0; i < URB_COUNT; i++) { @@ -100,10 +101,10 @@ static int start_urb_transfer(struct au0828_dev *dev) struct urb *purb; int i, ret = -ENOMEM; - dprintk(2, "%s()\n", __FUNCTION__); + dprintk(2, "%s()\n", __func__); if (dev->urb_streaming) { - dprintk(2, "%s: iso xfer already running!\n", __FUNCTION__); + dprintk(2, "%s: iso xfer already running!\n", __func__); return 0; } @@ -138,7 +139,8 @@ static int start_urb_transfer(struct au0828_dev *dev) ret = usb_submit_urb(dev->urbs[i], GFP_ATOMIC); if (ret != 0) { stop_urb_transfer(dev); - printk("%s: failed urb submission, err = %d\n", __FUNCTION__, ret); + printk(KERN_ERR "%s: failed urb submission, " + "err = %d\n", __func__, ret); return ret; } } @@ -157,7 +159,7 @@ static int au0828_dvb_start_feed(struct dvb_demux_feed *feed) struct au0828_dvb *dvb = &dev->dvb; int ret = 0; - dprintk(1, "%s()\n", __FUNCTION__); + dprintk(1, "%s()\n", __func__); if (!demux->dmx.frontend) return -EINVAL; @@ -185,7 +187,7 @@ static int au0828_dvb_stop_feed(struct dvb_demux_feed *feed) struct au0828_dvb *dvb = &dev->dvb; int ret = 0; - dprintk(1, "%s()\n", __FUNCTION__); + dprintk(1, "%s()\n", __func__); if (dvb) { mutex_lock(&dvb->lock); @@ -208,14 +210,14 @@ int dvb_register(struct au0828_dev *dev) struct au0828_dvb *dvb = &dev->dvb; int result; - dprintk(1, "%s()\n", __FUNCTION__); + dprintk(1, "%s()\n", __func__); /* register adapter */ result = dvb_register_adapter(&dvb->adapter, DRIVER_NAME, THIS_MODULE, &dev->usbdev->dev, adapter_nr); if (result < 0) { - printk(KERN_ERROR "%s: dvb_register_adapter failed (errno = %d)\n", - DRIVER_NAME, result); + printk(KERN_ERR "%s: dvb_register_adapter failed " + "(errno = %d)\n", DRIVER_NAME, result); goto fail_adapter; } dvb->adapter.priv = dev; @@ -223,8 +225,8 @@ int dvb_register(struct au0828_dev *dev) /* register frontend */ result = dvb_register_frontend(&dvb->adapter, dvb->frontend); if (result < 0) { - printk(KERN_ERR "%s: dvb_register_frontend failed (errno = %d)\n", - DRIVER_NAME, result); + printk(KERN_ERR "%s: dvb_register_frontend failed " + "(errno = %d)\n", DRIVER_NAME, result); goto fail_frontend; } @@ -257,16 +259,16 @@ int dvb_register(struct au0828_dev *dev) dvb->fe_hw.source = DMX_FRONTEND_0; result = dvb->demux.dmx.add_frontend(&dvb->demux.dmx, &dvb->fe_hw); if (result < 0) { - printk(KERN_ERR "%s: add_frontend failed (DMX_FRONTEND_0, errno = %d)\n", - DRIVER_NAME, result); + printk(KERN_ERR "%s: add_frontend failed " + "(DMX_FRONTEND_0, errno = %d)\n", DRIVER_NAME, result); goto fail_fe_hw; } dvb->fe_mem.source = DMX_MEMORY_FE; result = dvb->demux.dmx.add_frontend(&dvb->demux.dmx, &dvb->fe_mem); if (result < 0) { - printk(KERN_ERR "%s: add_frontend failed (DMX_MEMORY_FE, errno = %d)\n", - DRIVER_NAME, result); + printk(KERN_ERR "%s: add_frontend failed " + "(DMX_MEMORY_FE, errno = %d)\n", DRIVER_NAME, result); goto fail_fe_mem; } @@ -302,7 +304,7 @@ void au0828_dvb_unregister(struct au0828_dev *dev) { struct au0828_dvb *dvb = &dev->dvb; - dprintk(1, "%s()\n", __FUNCTION__); + dprintk(1, "%s()\n", __func__); if(dvb->frontend == NULL) return; @@ -326,7 +328,7 @@ int au0828_dvb_register(struct au0828_dev *dev) struct au0828_dvb *dvb = &dev->dvb; int ret; - dprintk(1, "%s()\n", __FUNCTION__); + dprintk(1, "%s()\n", __func__); /* init frontend */ switch (dev->board) { @@ -344,11 +346,13 @@ int au0828_dvb_register(struct au0828_dev *dev) } break; default: - printk("The frontend of your DVB/ATSC card isn't supported yet\n"); + printk(KERN_WARNING "The frontend of your DVB/ATSC card " + "isn't supported yet\n"); break; } if (NULL == dvb->frontend) { - printk(KERN_ERR "%s() Frontend initialization failed\n", __FUNCTION__); + printk(KERN_ERR "%s() Frontend initialization failed\n", + __func__); return -1; } diff --git a/drivers/media/video/au0828/au0828-i2c.c b/drivers/media/video/au0828/au0828-i2c.c index 4545a9cbaa..c1e1cf6ed9 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, int i, strobe = 0; struct au0828_dev *dev = i2c_adap->algo_data; - dprintk(4, "%s()\n", __FUNCTION__); + dprintk(4, "%s()\n", __func__); au0828_write(dev, REG_2FF, 0x01); au0828_write(dev, REG_202, 0x07); @@ -192,7 +192,7 @@ static int i2c_readbytes(struct i2c_adapter *i2c_adap, struct au0828_dev *dev = i2c_adap->algo_data; int i; - dprintk(4, "%s()\n", __FUNCTION__); + dprintk(4, "%s()\n", __func__); au0828_write(dev, REG_2FF, 0x01); au0828_write(dev, REG_202, 0x07); @@ -239,11 +239,11 @@ static int i2c_xfer(struct i2c_adapter *i2c_adap, { int i, retval = 0; - dprintk(4, "%s(num = %d)\n", __FUNCTION__, num); + dprintk(4, "%s(num = %d)\n", __func__, num); for (i = 0 ; i < num; i++) { dprintk(4, "%s(num = %d) addr = 0x%02x len = 0x%x\n", - __FUNCTION__, num, msgs[i].addr, msgs[i].len); + __func__, num, msgs[i].addr, msgs[i].len); if (msgs[i].flags & I2C_M_RD) { /* read */ retval = i2c_readbytes(i2c_adap, &msgs[i], 0); @@ -346,7 +346,7 @@ static void do_i2c_scan(char *name, struct i2c_client *c) /* init + register i2c algo-bit adapter */ int au0828_i2c_register(struct au0828_dev *dev) { - dprintk(1, "%s()\n", __FUNCTION__); + dprintk(1, "%s()\n", __func__); memcpy(&dev->i2c_adap, &au0828_i2c_adap_template, sizeof(dev->i2c_adap)); -- 2.39.5