diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2009-03-10 19:28:33 -0700 |
---|---|---|
committer | Trent Piepho <xyzzy@speakeasy.org> | 2009-03-10 19:28:33 -0700 |
commit | f120858809ddd698f0fcf18b339b5c85112ff308 (patch) | |
tree | 20d5796c25422dad7ce418535ef854a74d37425b /linux/drivers/media/video/zoran/zoran_card.c | |
parent | f542aede4d7c37a87c603e57f282b647c9550861 (diff) | |
download | mediapointer-dvb-s2-f120858809ddd698f0fcf18b339b5c85112ff308.tar.gz mediapointer-dvb-s2-f120858809ddd698f0fcf18b339b5c85112ff308.tar.bz2 |
zoran: replace functions names in strings with __func__
From: Trent Piepho <xyzzy@speakeasy.org>
It reduces the size of the driver over all, and the function names in
strings need to be manually kept up to date while __func__ doesn't.
Priority: normal
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Diffstat (limited to 'linux/drivers/media/video/zoran/zoran_card.c')
-rw-r--r-- | linux/drivers/media/video/zoran/zoran_card.c | 115 |
1 files changed, 46 insertions, 69 deletions
diff --git a/linux/drivers/media/video/zoran/zoran_card.c b/linux/drivers/media/video/zoran/zoran_card.c index 57cc62d82..4a76df3f8 100644 --- a/linux/drivers/media/video/zoran/zoran_card.c +++ b/linux/drivers/media/video/zoran/zoran_card.c @@ -255,7 +255,7 @@ zr36016_write (struct videocodec *codec, static void dc10_init (struct zoran *zr) { - dprintk(3, KERN_DEBUG "%s: dc10_init()\n", ZR_DEVNAME(zr)); + dprintk(3, KERN_DEBUG "%s: %s\n", ZR_DEVNAME(zr), __func__); /* Pixel clock selection */ GPIO(zr, 4, 0); @@ -267,13 +267,13 @@ dc10_init (struct zoran *zr) static void dc10plus_init (struct zoran *zr) { - dprintk(3, KERN_DEBUG "%s: dc10plus_init()\n", ZR_DEVNAME(zr)); + dprintk(3, KERN_DEBUG "%s: %s\n", ZR_DEVNAME(zr), __func__); } static void buz_init (struct zoran *zr) { - dprintk(3, KERN_DEBUG "%s: buz_init()\n", ZR_DEVNAME(zr)); + dprintk(3, KERN_DEBUG "%s: %s\n", ZR_DEVNAME(zr), __func__); /* some stuff from Iomega */ pci_write_config_dword(zr->pci_dev, 0xfc, 0x90680f15); @@ -284,7 +284,7 @@ buz_init (struct zoran *zr) static void lml33_init (struct zoran *zr) { - dprintk(3, KERN_DEBUG "%s: lml33_init()\n", ZR_DEVNAME(zr)); + dprintk(3, KERN_DEBUG "%s: %s\n", ZR_DEVNAME(zr), __func__); GPIO(zr, 2, 1); // Set Composite input/output } @@ -759,13 +759,13 @@ zoran_check_jpg_settings (struct zoran *zr, dprintk(4, KERN_DEBUG - "%s: check_jpg_settings() - dec: %d, Hdcm: %d, Vdcm: %d, Tdcm: %d\n", - ZR_DEVNAME(zr), settings->decimation, settings->HorDcm, + "%s: %s - dec: %d, Hdcm: %d, Vdcm: %d, Tdcm: %d\n", + ZR_DEVNAME(zr), __func__, settings->decimation, settings->HorDcm, settings->VerDcm, settings->TmpDcm); dprintk(4, KERN_DEBUG - "%s: check_jpg_settings() - x: %d, y: %d, w: %d, y: %d\n", - ZR_DEVNAME(zr), settings->img_x, settings->img_y, + "%s: %s - x: %d, y: %d, w: %d, y: %d\n", + ZR_DEVNAME(zr), __func__, settings->img_x, settings->img_y, settings->img_width, settings->img_height); /* Check decimation, set default values for decimation = 1, 2, 4 */ switch (settings->decimation) { @@ -797,8 +797,8 @@ zoran_check_jpg_settings (struct zoran *zr, if (zr->card.type == DC10_new) { dprintk(1, KERN_DEBUG - "%s: check_jpg_settings() - HDec by 4 is not supported on the DC10\n", - ZR_DEVNAME(zr)); + "%s: %s - HDec by 4 is not supported on the DC10\n", + ZR_DEVNAME(zr), __func__); err0++; break; } @@ -875,16 +875,16 @@ zoran_check_jpg_settings (struct zoran *zr, if (!try && err0) { dprintk(1, KERN_ERR - "%s: check_jpg_settings() - error in params for decimation = 0\n", - ZR_DEVNAME(zr)); + "%s: %s - error in params for decimation = 0\n", + ZR_DEVNAME(zr), __func__); err++; } break; default: dprintk(1, KERN_ERR - "%s: check_jpg_settings() - decimation = %d, must be 0, 1, 2 or 4\n", - ZR_DEVNAME(zr), settings->decimation); + "%s: %s - decimation = %d, must be 0, 1, 2 or 4\n", + ZR_DEVNAME(zr), __func__, settings->decimation); err++; break; } @@ -964,10 +964,8 @@ zoran_open_init_params (struct zoran *zr) JPEG_MARKER_DHT | JPEG_MARKER_DQT; i = zoran_check_jpg_settings(zr, &zr->jpg_settings, 0); if (i) - dprintk(1, - KERN_ERR - "%s: zoran_open_init_params() internal error\n", - ZR_DEVNAME(zr)); + dprintk(1, KERN_ERR "%s: %s internal error\n", + ZR_DEVNAME(zr), __func__); clear_interrupt_counters(zr); zr->testing = 0; @@ -1006,8 +1004,8 @@ zr36057_init (struct zoran *zr) dprintk(1, KERN_INFO - "%s: zr36057_init() - initializing card[%d], zr=%p\n", - ZR_DEVNAME(zr), zr->id, zr); + "%s: %s - initializing card[%d], zr=%p\n", + ZR_DEVNAME(zr), __func__, zr->id, zr); /* default setup of all parameters which will persist between opens */ zr->user = 0; @@ -1040,8 +1038,8 @@ zr36057_init (struct zoran *zr) if (zr->timing == NULL) { dprintk(1, KERN_WARNING - "%s: zr36057_init() - default TV standard not supported by hardware. PAL will be used.\n", - ZR_DEVNAME(zr)); + "%s: %s - default TV standard not supported by hardware. PAL will be used.\n", + ZR_DEVNAME(zr), __func__); zr->norm = V4L2_STD_PAL; zr->timing = zr->card.tvn[0]; } @@ -1065,8 +1063,8 @@ zr36057_init (struct zoran *zr) if (!zr->stat_com || !zr->video_dev) { dprintk(1, KERN_ERR - "%s: zr36057_init() - kmalloc (STAT_COM) failed\n", - ZR_DEVNAME(zr)); + "%s: %s - kmalloc (STAT_COM) failed\n", + ZR_DEVNAME(zr), __func__); err = -ENOMEM; goto exit_free; } @@ -1160,10 +1158,8 @@ zoran_setup_videocodec (struct zoran *zr, m = kmalloc(sizeof(struct videocodec_master), GFP_KERNEL); if (!m) { - dprintk(1, - KERN_ERR - "%s: zoran_setup_videocodec() - no memory\n", - ZR_DEVNAME(zr)); + dprintk(1, KERN_ERR "%s: %s - no memory\n", + ZR_DEVNAME(zr), __func__); return m; } @@ -1220,19 +1216,15 @@ static int __devinit zoran_probe(struct pci_dev *pdev, nr = zoran_num++; if (nr >= BUZ_MAX) { - dprintk(1, - KERN_ERR - "%s: driver limited to %d card(s) maximum\n", + dprintk(1, KERN_ERR "%s: driver limited to %d card(s) maximum\n", ZORAN_NAME, BUZ_MAX); return -ENOENT; } zr = kzalloc(sizeof(struct zoran), GFP_KERNEL); if (!zr) { - dprintk(1, - KERN_ERR - "%s: find_zr36057() - kzalloc failed\n", - ZORAN_NAME); + dprintk(1, KERN_ERR "%s: %s - kzalloc failed\n", + ZORAN_NAME, __func__); return -ENOMEM; } if (v4l2_device_register(&pdev->dev, &zr->v4l2_dev)) @@ -1307,9 +1299,7 @@ static int __devinit zoran_probe(struct pci_dev *pdev, zr->zr36057_mem = pci_ioremap_bar(zr->pci_dev, 0); if (!zr->zr36057_mem) { - dprintk(1, - KERN_ERR - "%s: %s() - ioremap failed\n", + dprintk(1, KERN_ERR "%s: %s() - ioremap failed\n", ZR_DEVNAME(zr), __func__); goto zr_unreg; } @@ -1320,18 +1310,18 @@ static int __devinit zoran_probe(struct pci_dev *pdev, if (result == -EINVAL) { dprintk(1, KERN_ERR - "%s: find_zr36057() - bad irq number or handler\n", - ZR_DEVNAME(zr)); + "%s: %s - bad irq number or handler\n", + ZR_DEVNAME(zr), __func__); } else if (result == -EBUSY) { dprintk(1, KERN_ERR - "%s: find_zr36057() - IRQ %d busy, change your PnP config in BIOS\n", - ZR_DEVNAME(zr), zr->pci_dev->irq); + "%s: %s - IRQ %d busy, change your PnP config in BIOS\n", + ZR_DEVNAME(zr), __func__, zr->pci_dev->irq); } else { dprintk(1, KERN_ERR - "%s: find_zr36057() - can't assign irq, error code %d\n", - ZR_DEVNAME(zr), result); + "%s: %s - can't assign irq, error code %d\n", + ZR_DEVNAME(zr), __func__, result); } goto zr_unmap; } @@ -1341,9 +1331,7 @@ static int __devinit zoran_probe(struct pci_dev *pdev, &latency); need_latency = zr->revision > 1 ? 32 : 48; if (latency != need_latency) { - dprintk(2, - KERN_INFO - "%s: Changing PCI latency from %d to %d\n", + dprintk(2, KERN_INFO "%s: Changing PCI latency from %d to %d\n", ZR_DEVNAME(zr), latency, need_latency); pci_write_config_byte(zr->pci_dev, PCI_LATENCY_TIMER, need_latency); @@ -1355,10 +1343,8 @@ static int __devinit zoran_probe(struct pci_dev *pdev, ZR_DEVNAME(zr)); if (zoran_register_i2c(zr) < 0) { - dprintk(1, - KERN_ERR - "%s: find_zr36057() - can't initialize i2c bus\n", - ZR_DEVNAME(zr)); + dprintk(1, KERN_ERR "%s: %s - can't initialize i2c bus\n", + ZR_DEVNAME(zr), __func__); goto zr_free_irq; } @@ -1410,17 +1396,13 @@ static int __devinit zoran_probe(struct pci_dev *pdev, goto zr_unreg_i2c; zr->codec = videocodec_attach(master_codec); if (!zr->codec) { - dprintk(1, - KERN_ERR - "%s: find_zr36057() - no codec found\n", - ZR_DEVNAME(zr)); + dprintk(1, KERN_ERR "%s: %s - no codec found\n", + ZR_DEVNAME(zr), __func__); goto zr_free_codec; } if (zr->codec->type != zr->card.video_codec) { - dprintk(1, - KERN_ERR - "%s: find_zr36057() - wrong codec\n", - ZR_DEVNAME(zr)); + dprintk(1, KERN_ERR "%s: %s - wrong codec\n", + ZR_DEVNAME(zr), __func__); goto zr_detach_codec; } } @@ -1430,17 +1412,13 @@ static int __devinit zoran_probe(struct pci_dev *pdev, goto zr_detach_codec; zr->vfe = videocodec_attach(master_vfe); if (!zr->vfe) { - dprintk(1, - KERN_ERR - "%s: find_zr36057() - no VFE found\n", - ZR_DEVNAME(zr)); + dprintk(1, KERN_ERR "%s: %s - no VFE found\n", + ZR_DEVNAME(zr), __func__); goto zr_free_vfe; } if (zr->vfe->type != zr->card.video_vfe) { - dprintk(1, - KERN_ERR - "%s: find_zr36057() = wrong VFE\n", - ZR_DEVNAME(zr)); + dprintk(1, KERN_ERR "%s: %s = wrong VFE\n", + ZR_DEVNAME(zr), __func__); goto zr_detach_vfe; } } @@ -1448,8 +1426,7 @@ static int __devinit zoran_probe(struct pci_dev *pdev, /* take care of Natoma chipset and a revision 1 zr36057 */ if ((pci_pci_problems & PCIPCI_NATOMA) && zr->revision <= 1) { zr->jpg_buffers.need_contiguous = 1; - dprintk(1, - KERN_INFO + dprintk(1, KERN_INFO "%s: ZR36057/Natoma bug, max. buffer size is 128K\n", ZR_DEVNAME(zr)); } |