Commit c61402ba authored by Trent Piepho's avatar Trent Piepho Committed by Mauro Carvalho Chehab

V4L/DVB (10934): zoran: replace functions names in strings with __func__

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.
Signed-off-by: default avatarTrent Piepho <xyzzy@speakeasy.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent e5ee3f64
...@@ -254,7 +254,7 @@ zr36016_write (struct videocodec *codec, ...@@ -254,7 +254,7 @@ zr36016_write (struct videocodec *codec,
static void static void
dc10_init (struct zoran *zr) 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 */ /* Pixel clock selection */
GPIO(zr, 4, 0); GPIO(zr, 4, 0);
...@@ -266,13 +266,13 @@ dc10_init (struct zoran *zr) ...@@ -266,13 +266,13 @@ dc10_init (struct zoran *zr)
static void static void
dc10plus_init (struct zoran *zr) 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 static void
buz_init (struct zoran *zr) 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 */ /* some stuff from Iomega */
pci_write_config_dword(zr->pci_dev, 0xfc, 0x90680f15); pci_write_config_dword(zr->pci_dev, 0xfc, 0x90680f15);
...@@ -283,7 +283,7 @@ buz_init (struct zoran *zr) ...@@ -283,7 +283,7 @@ buz_init (struct zoran *zr)
static void static void
lml33_init (struct zoran *zr) 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 GPIO(zr, 2, 1); // Set Composite input/output
} }
...@@ -758,13 +758,13 @@ zoran_check_jpg_settings (struct zoran *zr, ...@@ -758,13 +758,13 @@ zoran_check_jpg_settings (struct zoran *zr,
dprintk(4, dprintk(4,
KERN_DEBUG KERN_DEBUG
"%s: check_jpg_settings() - dec: %d, Hdcm: %d, Vdcm: %d, Tdcm: %d\n", "%s: %s - dec: %d, Hdcm: %d, Vdcm: %d, Tdcm: %d\n",
ZR_DEVNAME(zr), settings->decimation, settings->HorDcm, ZR_DEVNAME(zr), __func__, settings->decimation, settings->HorDcm,
settings->VerDcm, settings->TmpDcm); settings->VerDcm, settings->TmpDcm);
dprintk(4, dprintk(4,
KERN_DEBUG KERN_DEBUG
"%s: check_jpg_settings() - x: %d, y: %d, w: %d, y: %d\n", "%s: %s - x: %d, y: %d, w: %d, y: %d\n",
ZR_DEVNAME(zr), settings->img_x, settings->img_y, ZR_DEVNAME(zr), __func__, settings->img_x, settings->img_y,
settings->img_width, settings->img_height); settings->img_width, settings->img_height);
/* Check decimation, set default values for decimation = 1, 2, 4 */ /* Check decimation, set default values for decimation = 1, 2, 4 */
switch (settings->decimation) { switch (settings->decimation) {
...@@ -796,8 +796,8 @@ zoran_check_jpg_settings (struct zoran *zr, ...@@ -796,8 +796,8 @@ zoran_check_jpg_settings (struct zoran *zr,
if (zr->card.type == DC10_new) { if (zr->card.type == DC10_new) {
dprintk(1, dprintk(1,
KERN_DEBUG KERN_DEBUG
"%s: check_jpg_settings() - HDec by 4 is not supported on the DC10\n", "%s: %s - HDec by 4 is not supported on the DC10\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
err0++; err0++;
break; break;
} }
...@@ -874,16 +874,16 @@ zoran_check_jpg_settings (struct zoran *zr, ...@@ -874,16 +874,16 @@ zoran_check_jpg_settings (struct zoran *zr,
if (!try && err0) { if (!try && err0) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: check_jpg_settings() - error in params for decimation = 0\n", "%s: %s - error in params for decimation = 0\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
err++; err++;
} }
break; break;
default: default:
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: check_jpg_settings() - decimation = %d, must be 0, 1, 2 or 4\n", "%s: %s - decimation = %d, must be 0, 1, 2 or 4\n",
ZR_DEVNAME(zr), settings->decimation); ZR_DEVNAME(zr), __func__, settings->decimation);
err++; err++;
break; break;
} }
...@@ -963,10 +963,8 @@ zoran_open_init_params (struct zoran *zr) ...@@ -963,10 +963,8 @@ zoran_open_init_params (struct zoran *zr)
JPEG_MARKER_DHT | JPEG_MARKER_DQT; JPEG_MARKER_DHT | JPEG_MARKER_DQT;
i = zoran_check_jpg_settings(zr, &zr->jpg_settings, 0); i = zoran_check_jpg_settings(zr, &zr->jpg_settings, 0);
if (i) if (i)
dprintk(1, dprintk(1, KERN_ERR "%s: %s internal error\n",
KERN_ERR ZR_DEVNAME(zr), __func__);
"%s: zoran_open_init_params() internal error\n",
ZR_DEVNAME(zr));
clear_interrupt_counters(zr); clear_interrupt_counters(zr);
zr->testing = 0; zr->testing = 0;
...@@ -1005,8 +1003,8 @@ zr36057_init (struct zoran *zr) ...@@ -1005,8 +1003,8 @@ zr36057_init (struct zoran *zr)
dprintk(1, dprintk(1,
KERN_INFO KERN_INFO
"%s: zr36057_init() - initializing card[%d], zr=%p\n", "%s: %s - initializing card[%d], zr=%p\n",
ZR_DEVNAME(zr), zr->id, zr); ZR_DEVNAME(zr), __func__, zr->id, zr);
/* default setup of all parameters which will persist between opens */ /* default setup of all parameters which will persist between opens */
zr->user = 0; zr->user = 0;
...@@ -1039,8 +1037,8 @@ zr36057_init (struct zoran *zr) ...@@ -1039,8 +1037,8 @@ zr36057_init (struct zoran *zr)
if (zr->timing == NULL) { if (zr->timing == NULL) {
dprintk(1, dprintk(1,
KERN_WARNING KERN_WARNING
"%s: zr36057_init() - default TV standard not supported by hardware. PAL will be used.\n", "%s: %s - default TV standard not supported by hardware. PAL will be used.\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
zr->norm = V4L2_STD_PAL; zr->norm = V4L2_STD_PAL;
zr->timing = zr->card.tvn[0]; zr->timing = zr->card.tvn[0];
} }
...@@ -1064,8 +1062,8 @@ zr36057_init (struct zoran *zr) ...@@ -1064,8 +1062,8 @@ zr36057_init (struct zoran *zr)
if (!zr->stat_com || !zr->video_dev) { if (!zr->stat_com || !zr->video_dev) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: zr36057_init() - kmalloc (STAT_COM) failed\n", "%s: %s - kmalloc (STAT_COM) failed\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
err = -ENOMEM; err = -ENOMEM;
goto exit_free; goto exit_free;
} }
...@@ -1159,10 +1157,8 @@ zoran_setup_videocodec (struct zoran *zr, ...@@ -1159,10 +1157,8 @@ zoran_setup_videocodec (struct zoran *zr,
m = kmalloc(sizeof(struct videocodec_master), GFP_KERNEL); m = kmalloc(sizeof(struct videocodec_master), GFP_KERNEL);
if (!m) { if (!m) {
dprintk(1, dprintk(1, KERN_ERR "%s: %s - no memory\n",
KERN_ERR ZR_DEVNAME(zr), __func__);
"%s: zoran_setup_videocodec() - no memory\n",
ZR_DEVNAME(zr));
return m; return m;
} }
...@@ -1219,19 +1215,15 @@ static int __devinit zoran_probe(struct pci_dev *pdev, ...@@ -1219,19 +1215,15 @@ static int __devinit zoran_probe(struct pci_dev *pdev,
nr = zoran_num++; nr = zoran_num++;
if (nr >= BUZ_MAX) { if (nr >= BUZ_MAX) {
dprintk(1, dprintk(1, KERN_ERR "%s: driver limited to %d card(s) maximum\n",
KERN_ERR
"%s: driver limited to %d card(s) maximum\n",
ZORAN_NAME, BUZ_MAX); ZORAN_NAME, BUZ_MAX);
return -ENOENT; return -ENOENT;
} }
zr = kzalloc(sizeof(struct zoran), GFP_KERNEL); zr = kzalloc(sizeof(struct zoran), GFP_KERNEL);
if (!zr) { if (!zr) {
dprintk(1, dprintk(1, KERN_ERR "%s: %s - kzalloc failed\n",
KERN_ERR ZORAN_NAME, __func__);
"%s: find_zr36057() - kzalloc failed\n",
ZORAN_NAME);
return -ENOMEM; return -ENOMEM;
} }
if (v4l2_device_register(&pdev->dev, &zr->v4l2_dev)) if (v4l2_device_register(&pdev->dev, &zr->v4l2_dev))
...@@ -1306,9 +1298,7 @@ static int __devinit zoran_probe(struct pci_dev *pdev, ...@@ -1306,9 +1298,7 @@ static int __devinit zoran_probe(struct pci_dev *pdev,
zr->zr36057_mem = pci_ioremap_bar(zr->pci_dev, 0); zr->zr36057_mem = pci_ioremap_bar(zr->pci_dev, 0);
if (!zr->zr36057_mem) { if (!zr->zr36057_mem) {
dprintk(1, dprintk(1, KERN_ERR "%s: %s() - ioremap failed\n",
KERN_ERR
"%s: %s() - ioremap failed\n",
ZR_DEVNAME(zr), __func__); ZR_DEVNAME(zr), __func__);
goto zr_unreg; goto zr_unreg;
} }
...@@ -1319,18 +1309,18 @@ static int __devinit zoran_probe(struct pci_dev *pdev, ...@@ -1319,18 +1309,18 @@ static int __devinit zoran_probe(struct pci_dev *pdev,
if (result == -EINVAL) { if (result == -EINVAL) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: find_zr36057() - bad irq number or handler\n", "%s: %s - bad irq number or handler\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
} else if (result == -EBUSY) { } else if (result == -EBUSY) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: find_zr36057() - IRQ %d busy, change your PnP config in BIOS\n", "%s: %s - IRQ %d busy, change your PnP config in BIOS\n",
ZR_DEVNAME(zr), zr->pci_dev->irq); ZR_DEVNAME(zr), __func__, zr->pci_dev->irq);
} else { } else {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: find_zr36057() - can't assign irq, error code %d\n", "%s: %s - can't assign irq, error code %d\n",
ZR_DEVNAME(zr), result); ZR_DEVNAME(zr), __func__, result);
} }
goto zr_unmap; goto zr_unmap;
} }
...@@ -1340,9 +1330,7 @@ static int __devinit zoran_probe(struct pci_dev *pdev, ...@@ -1340,9 +1330,7 @@ static int __devinit zoran_probe(struct pci_dev *pdev,
&latency); &latency);
need_latency = zr->revision > 1 ? 32 : 48; need_latency = zr->revision > 1 ? 32 : 48;
if (latency != need_latency) { if (latency != need_latency) {
dprintk(2, dprintk(2, KERN_INFO "%s: Changing PCI latency from %d to %d\n",
KERN_INFO
"%s: Changing PCI latency from %d to %d\n",
ZR_DEVNAME(zr), latency, need_latency); ZR_DEVNAME(zr), latency, need_latency);
pci_write_config_byte(zr->pci_dev, PCI_LATENCY_TIMER, pci_write_config_byte(zr->pci_dev, PCI_LATENCY_TIMER,
need_latency); need_latency);
...@@ -1354,10 +1342,8 @@ static int __devinit zoran_probe(struct pci_dev *pdev, ...@@ -1354,10 +1342,8 @@ static int __devinit zoran_probe(struct pci_dev *pdev,
ZR_DEVNAME(zr)); ZR_DEVNAME(zr));
if (zoran_register_i2c(zr) < 0) { if (zoran_register_i2c(zr) < 0) {
dprintk(1, dprintk(1, KERN_ERR "%s: %s - can't initialize i2c bus\n",
KERN_ERR ZR_DEVNAME(zr), __func__);
"%s: find_zr36057() - can't initialize i2c bus\n",
ZR_DEVNAME(zr));
goto zr_free_irq; goto zr_free_irq;
} }
...@@ -1409,17 +1395,13 @@ static int __devinit zoran_probe(struct pci_dev *pdev, ...@@ -1409,17 +1395,13 @@ static int __devinit zoran_probe(struct pci_dev *pdev,
goto zr_unreg_i2c; goto zr_unreg_i2c;
zr->codec = videocodec_attach(master_codec); zr->codec = videocodec_attach(master_codec);
if (!zr->codec) { if (!zr->codec) {
dprintk(1, dprintk(1, KERN_ERR "%s: %s - no codec found\n",
KERN_ERR ZR_DEVNAME(zr), __func__);
"%s: find_zr36057() - no codec found\n",
ZR_DEVNAME(zr));
goto zr_free_codec; goto zr_free_codec;
} }
if (zr->codec->type != zr->card.video_codec) { if (zr->codec->type != zr->card.video_codec) {
dprintk(1, dprintk(1, KERN_ERR "%s: %s - wrong codec\n",
KERN_ERR ZR_DEVNAME(zr), __func__);
"%s: find_zr36057() - wrong codec\n",
ZR_DEVNAME(zr));
goto zr_detach_codec; goto zr_detach_codec;
} }
} }
...@@ -1429,17 +1411,13 @@ static int __devinit zoran_probe(struct pci_dev *pdev, ...@@ -1429,17 +1411,13 @@ static int __devinit zoran_probe(struct pci_dev *pdev,
goto zr_detach_codec; goto zr_detach_codec;
zr->vfe = videocodec_attach(master_vfe); zr->vfe = videocodec_attach(master_vfe);
if (!zr->vfe) { if (!zr->vfe) {
dprintk(1, dprintk(1, KERN_ERR "%s: %s - no VFE found\n",
KERN_ERR ZR_DEVNAME(zr), __func__);
"%s: find_zr36057() - no VFE found\n",
ZR_DEVNAME(zr));
goto zr_free_vfe; goto zr_free_vfe;
} }
if (zr->vfe->type != zr->card.video_vfe) { if (zr->vfe->type != zr->card.video_vfe) {
dprintk(1, dprintk(1, KERN_ERR "%s: %s = wrong VFE\n",
KERN_ERR ZR_DEVNAME(zr), __func__);
"%s: find_zr36057() = wrong VFE\n",
ZR_DEVNAME(zr));
goto zr_detach_vfe; goto zr_detach_vfe;
} }
} }
...@@ -1447,8 +1425,7 @@ static int __devinit zoran_probe(struct pci_dev *pdev, ...@@ -1447,8 +1425,7 @@ static int __devinit zoran_probe(struct pci_dev *pdev,
/* take care of Natoma chipset and a revision 1 zr36057 */ /* take care of Natoma chipset and a revision 1 zr36057 */
if ((pci_pci_problems & PCIPCI_NATOMA) && zr->revision <= 1) { if ((pci_pci_problems & PCIPCI_NATOMA) && zr->revision <= 1) {
zr->jpg_buffers.need_contiguous = 1; zr->jpg_buffers.need_contiguous = 1;
dprintk(1, dprintk(1, KERN_INFO
KERN_INFO
"%s: ZR36057/Natoma bug, max. buffer size is 128K\n", "%s: ZR36057/Natoma bug, max. buffer size is 128K\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr));
} }
......
...@@ -223,8 +223,8 @@ static int v4l_fbuffer_alloc(struct zoran_fh *fh) ...@@ -223,8 +223,8 @@ static int v4l_fbuffer_alloc(struct zoran_fh *fh)
if (fh->buffers.buffer[i].v4l.fbuffer) if (fh->buffers.buffer[i].v4l.fbuffer)
dprintk(2, dprintk(2,
KERN_WARNING KERN_WARNING
"%s: v4l_fbuffer_alloc() - buffer %d already allocated!?\n", "%s: %s - buffer %d already allocated!?\n",
ZR_DEVNAME(zr), i); ZR_DEVNAME(zr), __func__, i);
//udelay(20); //udelay(20);
mem = kmalloc(fh->buffers.buffer_size, mem = kmalloc(fh->buffers.buffer_size,
...@@ -232,8 +232,8 @@ static int v4l_fbuffer_alloc(struct zoran_fh *fh) ...@@ -232,8 +232,8 @@ static int v4l_fbuffer_alloc(struct zoran_fh *fh)
if (!mem) { if (!mem) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: v4l_fbuffer_alloc() - kmalloc for V4L buf %d failed\n", "%s: %s - kmalloc for V4L buf %d failed\n",
ZR_DEVNAME(zr), i); ZR_DEVNAME(zr), __func__, i);
v4l_fbuffer_free(fh); v4l_fbuffer_free(fh);
return -ENOBUFS; return -ENOBUFS;
} }
...@@ -245,8 +245,8 @@ static int v4l_fbuffer_alloc(struct zoran_fh *fh) ...@@ -245,8 +245,8 @@ static int v4l_fbuffer_alloc(struct zoran_fh *fh)
SetPageReserved(virt_to_page(mem + off)); SetPageReserved(virt_to_page(mem + off));
dprintk(4, dprintk(4,
KERN_INFO KERN_INFO
"%s: v4l_fbuffer_alloc() - V4L frame %d mem 0x%lx (bus: 0x%lx)\n", "%s: %s - V4L frame %d mem 0x%lx (bus: 0x%lx)\n",
ZR_DEVNAME(zr), i, (unsigned long) mem, ZR_DEVNAME(zr), __func__, i, (unsigned long) mem,
virt_to_bus(mem)); virt_to_bus(mem));
} }
...@@ -262,7 +262,7 @@ static void v4l_fbuffer_free(struct zoran_fh *fh) ...@@ -262,7 +262,7 @@ static void v4l_fbuffer_free(struct zoran_fh *fh)
int i, off; int i, off;
unsigned char *mem; unsigned char *mem;
dprintk(4, KERN_INFO "%s: v4l_fbuffer_free()\n", ZR_DEVNAME(zr)); dprintk(4, KERN_INFO "%s: %s\n", ZR_DEVNAME(zr), __func__);
for (i = 0; i < fh->buffers.num_buffers; i++) { for (i = 0; i < fh->buffers.num_buffers; i++) {
if (!fh->buffers.buffer[i].v4l.fbuffer) if (!fh->buffers.buffer[i].v4l.fbuffer)
...@@ -317,8 +317,8 @@ static int jpg_fbuffer_alloc(struct zoran_fh *fh) ...@@ -317,8 +317,8 @@ static int jpg_fbuffer_alloc(struct zoran_fh *fh)
if (fh->buffers.buffer[i].jpg.frag_tab) if (fh->buffers.buffer[i].jpg.frag_tab)
dprintk(2, dprintk(2,
KERN_WARNING KERN_WARNING
"%s: jpg_fbuffer_alloc() - buffer %d already allocated!?\n", "%s: %s - buffer %d already allocated!?\n",
ZR_DEVNAME(zr), i); ZR_DEVNAME(zr), __func__, i);
/* Allocate fragment table for this buffer */ /* Allocate fragment table for this buffer */
...@@ -326,8 +326,8 @@ static int jpg_fbuffer_alloc(struct zoran_fh *fh) ...@@ -326,8 +326,8 @@ static int jpg_fbuffer_alloc(struct zoran_fh *fh)
if (mem == 0) { if (mem == 0) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: jpg_fbuffer_alloc() - get_zeroed_page (frag_tab) failed for buffer %d\n", "%s: %s - get_zeroed_page (frag_tab) failed for buffer %d\n",
ZR_DEVNAME(zr), i); ZR_DEVNAME(zr), __func__, i);
jpg_fbuffer_free(fh); jpg_fbuffer_free(fh);
return -ENOBUFS; return -ENOBUFS;
} }
...@@ -339,8 +339,8 @@ static int jpg_fbuffer_alloc(struct zoran_fh *fh) ...@@ -339,8 +339,8 @@ static int jpg_fbuffer_alloc(struct zoran_fh *fh)
if (mem == NULL) { if (mem == NULL) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: jpg_fbuffer_alloc() - kmalloc failed for buffer %d\n", "%s: %s - kmalloc failed for buffer %d\n",
ZR_DEVNAME(zr), i); ZR_DEVNAME(zr), __func__, i);
jpg_fbuffer_free(fh); jpg_fbuffer_free(fh);
return -ENOBUFS; return -ENOBUFS;
} }
...@@ -357,8 +357,8 @@ static int jpg_fbuffer_alloc(struct zoran_fh *fh) ...@@ -357,8 +357,8 @@ static int jpg_fbuffer_alloc(struct zoran_fh *fh)
if (mem == NULL) { if (mem == NULL) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: jpg_fbuffer_alloc() - get_zeroed_page failed for buffer %d\n", "%s: %s - get_zeroed_page failed for buffer %d\n",
ZR_DEVNAME(zr), i); ZR_DEVNAME(zr), __func__, i);
jpg_fbuffer_free(fh); jpg_fbuffer_free(fh);
return -ENOBUFS; return -ENOBUFS;
} }
...@@ -375,8 +375,8 @@ static int jpg_fbuffer_alloc(struct zoran_fh *fh) ...@@ -375,8 +375,8 @@ static int jpg_fbuffer_alloc(struct zoran_fh *fh)
} }
dprintk(4, dprintk(4,
KERN_DEBUG "%s: jpg_fbuffer_alloc() - %d KB allocated\n", KERN_DEBUG "%s: %s - %d KB allocated\n",
ZR_DEVNAME(zr), ZR_DEVNAME(zr), __func__,
(fh->buffers.num_buffers * fh->buffers.buffer_size) >> 10); (fh->buffers.num_buffers * fh->buffers.buffer_size) >> 10);
fh->buffers.allocated = 1; fh->buffers.allocated = 1;
...@@ -393,7 +393,7 @@ static void jpg_fbuffer_free(struct zoran_fh *fh) ...@@ -393,7 +393,7 @@ static void jpg_fbuffer_free(struct zoran_fh *fh)
__le32 frag_tab; __le32 frag_tab;
struct zoran_buffer *buffer; struct zoran_buffer *buffer;
dprintk(4, KERN_DEBUG "%s: jpg_fbuffer_free()\n", ZR_DEVNAME(zr)); dprintk(4, KERN_DEBUG "%s: %s\n", ZR_DEVNAME(zr), __func__);
for (i = 0, buffer = &fh->buffers.buffer[0]; for (i = 0, buffer = &fh->buffers.buffer[0];
i < fh->buffers.num_buffers; i++, buffer++) { i < fh->buffers.num_buffers; i++, buffer++) {
...@@ -450,8 +450,8 @@ zoran_v4l_set_format (struct zoran_fh *fh, ...@@ -450,8 +450,8 @@ zoran_v4l_set_format (struct zoran_fh *fh,
height > BUZ_MAX_HEIGHT || width > BUZ_MAX_WIDTH) { height > BUZ_MAX_HEIGHT || width > BUZ_MAX_WIDTH) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: v4l_set_format() - wrong frame size (%dx%d)\n", "%s: %s - wrong frame size (%dx%d)\n",
ZR_DEVNAME(zr), width, height); ZR_DEVNAME(zr), __func__, width, height);
return -EINVAL; return -EINVAL;
} }
...@@ -461,8 +461,8 @@ zoran_v4l_set_format (struct zoran_fh *fh, ...@@ -461,8 +461,8 @@ zoran_v4l_set_format (struct zoran_fh *fh,
if (height * width * bpp > fh->buffers.buffer_size) { if (height * width * bpp > fh->buffers.buffer_size) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: v4l_set_format() - video buffer size (%d kB) is too small\n", "%s: %s - video buffer size (%d kB) is too small\n",
ZR_DEVNAME(zr), fh->buffers.buffer_size >> 10); ZR_DEVNAME(zr), __func__, fh->buffers.buffer_size >> 10);
return -EINVAL; return -EINVAL;
} }
...@@ -471,8 +471,8 @@ zoran_v4l_set_format (struct zoran_fh *fh, ...@@ -471,8 +471,8 @@ zoran_v4l_set_format (struct zoran_fh *fh,
if ((bpp == 2 && (width & 1)) || (bpp == 3 && (width & 3))) { if ((bpp == 2 && (width & 1)) || (bpp == 3 && (width & 3))) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: v4l_set_format() - wrong frame alignment\n", "%s: %s - wrong frame alignment\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
return -EINVAL; return -EINVAL;
} }
...@@ -493,8 +493,8 @@ static int zoran_v4l_queue_frame(struct zoran_fh *fh, int num) ...@@ -493,8 +493,8 @@ static int zoran_v4l_queue_frame(struct zoran_fh *fh, int num)
if (!fh->buffers.allocated) { if (!fh->buffers.allocated) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: v4l_queue_frame() - buffers not yet allocated\n", "%s: %s - buffers not yet allocated\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
res = -ENOMEM; res = -ENOMEM;
} }
...@@ -502,8 +502,8 @@ static int zoran_v4l_queue_frame(struct zoran_fh *fh, int num) ...@@ -502,8 +502,8 @@ static int zoran_v4l_queue_frame(struct zoran_fh *fh, int num)
if (num >= fh->buffers.num_buffers || num < 0) { if (num >= fh->buffers.num_buffers || num < 0) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: v4l_queue_frame() - buffer %d is out of range\n", "%s: %s - buffer %d is out of range\n",
ZR_DEVNAME(zr), num); ZR_DEVNAME(zr), __func__, num);
res = -EINVAL; res = -EINVAL;
} }
...@@ -516,8 +516,8 @@ static int zoran_v4l_queue_frame(struct zoran_fh *fh, int num) ...@@ -516,8 +516,8 @@ static int zoran_v4l_queue_frame(struct zoran_fh *fh, int num)
} else { } else {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: v4l_queue_frame() - another session is already capturing\n", "%s: %s - another session is already capturing\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
res = -EBUSY; res = -EBUSY;
} }
} }
...@@ -536,8 +536,8 @@ static int zoran_v4l_queue_frame(struct zoran_fh *fh, int num) ...@@ -536,8 +536,8 @@ static int zoran_v4l_queue_frame(struct zoran_fh *fh, int num)
case BUZ_STATE_DONE: case BUZ_STATE_DONE:
dprintk(2, dprintk(2,
KERN_WARNING KERN_WARNING
"%s: v4l_queue_frame() - queueing buffer %d in state DONE!?\n", "%s: %s - queueing buffer %d in state DONE!?\n",
ZR_DEVNAME(zr), num); ZR_DEVNAME(zr), __func__, num);
case BUZ_STATE_USER: case BUZ_STATE_USER:
/* since there is at least one unused buffer there's room for at least /* since there is at least one unused buffer there's room for at least
* one more pend[] entry */ * one more pend[] entry */
...@@ -571,16 +571,16 @@ static int v4l_sync(struct zoran_fh *fh, int frame) ...@@ -571,16 +571,16 @@ static int v4l_sync(struct zoran_fh *fh, int frame)
if (fh->buffers.active == ZORAN_FREE) { if (fh->buffers.active == ZORAN_FREE) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: v4l_sync() - no grab active for this session\n", "%s: %s - no grab active for this session\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
return -EINVAL; return -EINVAL;
} }
/* check passed-in frame number */ /* check passed-in frame number */
if (frame >= fh->buffers.num_buffers || frame < 0) { if (frame >= fh->buffers.num_buffers || frame < 0) {
dprintk(1, dprintk(1,
KERN_ERR "%s: v4l_sync() - frame %d is invalid\n", KERN_ERR "%s: %s - frame %d is invalid\n",
ZR_DEVNAME(zr), frame); ZR_DEVNAME(zr), __func__, frame);
return -EINVAL; return -EINVAL;
} }
...@@ -588,8 +588,8 @@ static int v4l_sync(struct zoran_fh *fh, int frame) ...@@ -588,8 +588,8 @@ static int v4l_sync(struct zoran_fh *fh, int frame)
if (zr->v4l_buffers.buffer[frame].state == BUZ_STATE_USER) { if (zr->v4l_buffers.buffer[frame].state == BUZ_STATE_USER) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: v4l_sync() - attempt to sync on a buffer which was not queued?\n", "%s: %s - attempt to sync on a buffer which was not queued?\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
return -EPROTO; return -EPROTO;
} }
...@@ -603,8 +603,8 @@ static int v4l_sync(struct zoran_fh *fh, int frame) ...@@ -603,8 +603,8 @@ static int v4l_sync(struct zoran_fh *fh, int frame)
/* buffer should now be in BUZ_STATE_DONE */ /* buffer should now be in BUZ_STATE_DONE */
if (zr->v4l_buffers.buffer[frame].state != BUZ_STATE_DONE) if (zr->v4l_buffers.buffer[frame].state != BUZ_STATE_DONE)
dprintk(2, dprintk(2,
KERN_ERR "%s: v4l_sync() - internal state error\n", KERN_ERR "%s: %s - internal state error\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
zr->v4l_buffers.buffer[frame].state = BUZ_STATE_USER; zr->v4l_buffers.buffer[frame].state = BUZ_STATE_USER;
fh->buffers.buffer[frame] = zr->v4l_buffers.buffer[frame]; fh->buffers.buffer[frame] = zr->v4l_buffers.buffer[frame];
...@@ -640,8 +640,8 @@ static int zoran_jpg_queue_frame(struct zoran_fh *fh, int num, ...@@ -640,8 +640,8 @@ static int zoran_jpg_queue_frame(struct zoran_fh *fh, int num,
if (!fh->buffers.allocated) { if (!fh->buffers.allocated) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: jpg_queue_frame() - buffers not yet allocated\n", "%s: %s - buffers not yet allocated\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
return -ENOMEM; return -ENOMEM;
} }
...@@ -649,8 +649,8 @@ static int zoran_jpg_queue_frame(struct zoran_fh *fh, int num, ...@@ -649,8 +649,8 @@ static int zoran_jpg_queue_frame(struct zoran_fh *fh, int num,
if (num >= fh->buffers.num_buffers || num < 0) { if (num >= fh->buffers.num_buffers || num < 0) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: jpg_queue_frame() - buffer %d out of range\n", "%s: %s - buffer %d out of range\n",
ZR_DEVNAME(zr), num); ZR_DEVNAME(zr), __func__, num);
return -EINVAL; return -EINVAL;
} }
...@@ -661,8 +661,8 @@ static int zoran_jpg_queue_frame(struct zoran_fh *fh, int num, ...@@ -661,8 +661,8 @@ static int zoran_jpg_queue_frame(struct zoran_fh *fh, int num,
/* wrong codec mode active - invalid */ /* wrong codec mode active - invalid */
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: jpg_queue_frame() - codec in wrong mode\n", "%s: %s - codec in wrong mode\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
return -EINVAL; return -EINVAL;
} }
...@@ -673,8 +673,8 @@ static int zoran_jpg_queue_frame(struct zoran_fh *fh, int num, ...@@ -673,8 +673,8 @@ static int zoran_jpg_queue_frame(struct zoran_fh *fh, int num,
} else { } else {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: jpg_queue_frame() - another session is already capturing\n", "%s: %s - another session is already capturing\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
res = -EBUSY; res = -EBUSY;
} }
} }
...@@ -691,8 +691,8 @@ static int zoran_jpg_queue_frame(struct zoran_fh *fh, int num, ...@@ -691,8 +691,8 @@ static int zoran_jpg_queue_frame(struct zoran_fh *fh, int num,
case BUZ_STATE_DONE: case BUZ_STATE_DONE:
dprintk(2, dprintk(2,
KERN_WARNING KERN_WARNING
"%s: jpg_queue_frame() - queing frame in BUZ_STATE_DONE state!?\n", "%s: %s - queing frame in BUZ_STATE_DONE state!?\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
case BUZ_STATE_USER: case BUZ_STATE_USER:
/* since there is at least one unused buffer there's room for at /* since there is at least one unused buffer there's room for at
*least one more pend[] entry */ *least one more pend[] entry */
...@@ -732,8 +732,8 @@ static int jpg_qbuf(struct zoran_fh *fh, int frame, enum zoran_codec_mode mode) ...@@ -732,8 +732,8 @@ static int jpg_qbuf(struct zoran_fh *fh, int frame, enum zoran_codec_mode mode)
if (fh->buffers.active == ZORAN_FREE) { if (fh->buffers.active == ZORAN_FREE) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: jpg_qbuf(-1) - session not active\n", "%s: %s(-1) - session not active\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
return -EINVAL; return -EINVAL;
} }
fh->buffers.active = zr->jpg_buffers.active = ZORAN_FREE; fh->buffers.active = zr->jpg_buffers.active = ZORAN_FREE;
...@@ -743,8 +743,8 @@ static int jpg_qbuf(struct zoran_fh *fh, int frame, enum zoran_codec_mode mode) ...@@ -743,8 +743,8 @@ static int jpg_qbuf(struct zoran_fh *fh, int frame, enum zoran_codec_mode mode)
} else { } else {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: jpg_qbuf() - stop streaming but not in streaming mode\n", "%s: %s - stop streaming but not in streaming mode\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
return -EINVAL; return -EINVAL;
} }
} }
...@@ -772,16 +772,16 @@ static int jpg_sync(struct zoran_fh *fh, struct zoran_sync *bs) ...@@ -772,16 +772,16 @@ static int jpg_sync(struct zoran_fh *fh, struct zoran_sync *bs)
if (fh->buffers.active == ZORAN_FREE) { if (fh->buffers.active == ZORAN_FREE) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: jpg_sync() - capture is not currently active\n", "%s: %s - capture is not currently active\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
return -EINVAL; return -EINVAL;
} }
if (zr->codec_mode != BUZ_MODE_MOTION_DECOMPRESS && if (zr->codec_mode != BUZ_MODE_MOTION_DECOMPRESS &&
zr->codec_mode != BUZ_MODE_MOTION_COMPRESS) { zr->codec_mode != BUZ_MODE_MOTION_COMPRESS) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: jpg_sync() - codec not in streaming mode\n", "%s: %s - codec not in streaming mode\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
return -EINVAL; return -EINVAL;
} }
if (!wait_event_interruptible_timeout(zr->jpg_capq, if (!wait_event_interruptible_timeout(zr->jpg_capq,
...@@ -796,8 +796,8 @@ static int jpg_sync(struct zoran_fh *fh, struct zoran_sync *bs) ...@@ -796,8 +796,8 @@ static int jpg_sync(struct zoran_fh *fh, struct zoran_sync *bs)
sizeof(isr), &isr); sizeof(isr), &isr);
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: jpg_sync() - timeout: codec isr=0x%02x\n", "%s: %s - timeout: codec isr=0x%02x\n",
ZR_DEVNAME(zr), isr); ZR_DEVNAME(zr), __func__, isr);
return -ETIME; return -ETIME;
...@@ -815,8 +815,8 @@ static int jpg_sync(struct zoran_fh *fh, struct zoran_sync *bs) ...@@ -815,8 +815,8 @@ static int jpg_sync(struct zoran_fh *fh, struct zoran_sync *bs)
/* buffer should now be in BUZ_STATE_DONE */ /* buffer should now be in BUZ_STATE_DONE */
if (zr->jpg_buffers.buffer[frame].state != BUZ_STATE_DONE) if (zr->jpg_buffers.buffer[frame].state != BUZ_STATE_DONE)
dprintk(2, dprintk(2,
KERN_ERR "%s: jpg_sync() - internal state error\n", KERN_ERR "%s: %s - internal state error\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
*bs = zr->jpg_buffers.buffer[frame].bs; *bs = zr->jpg_buffers.buffer[frame].bs;
bs->frame = frame; bs->frame = frame;
...@@ -909,8 +909,8 @@ static int zoran_open(struct file *file) ...@@ -909,8 +909,8 @@ static int zoran_open(struct file *file)
struct zoran_fh *fh; struct zoran_fh *fh;
int res, first_open = 0; int res, first_open = 0;
dprintk(2, KERN_INFO "%s: zoran_open(%s, pid=[%d]), users(-)=%d\n", dprintk(2, KERN_INFO "%s: %s(%s, pid=[%d]), users(-)=%d\n",
ZR_DEVNAME(zr), current->comm, task_pid_nr(current), zr->user + 1); ZR_DEVNAME(zr), __func__, current->comm, task_pid_nr(current), zr->user + 1);
lock_kernel(); lock_kernel();
...@@ -926,8 +926,8 @@ static int zoran_open(struct file *file) ...@@ -926,8 +926,8 @@ static int zoran_open(struct file *file)
if (!fh) { if (!fh) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: zoran_open() - allocation of zoran_fh failed\n", "%s: %s - allocation of zoran_fh failed\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
res = -ENOMEM; res = -ENOMEM;
goto fail_unlock; goto fail_unlock;
} }
...@@ -938,8 +938,8 @@ static int zoran_open(struct file *file) ...@@ -938,8 +938,8 @@ static int zoran_open(struct file *file)
if (!fh->overlay_mask) { if (!fh->overlay_mask) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: zoran_open() - allocation of overlay_mask failed\n", "%s: %s - allocation of overlay_mask failed\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
res = -ENOMEM; res = -ENOMEM;
goto fail_fh; goto fail_fh;
} }
...@@ -983,8 +983,8 @@ zoran_close(struct file *file) ...@@ -983,8 +983,8 @@ zoran_close(struct file *file)
struct zoran_fh *fh = file->private_data; struct zoran_fh *fh = file->private_data;
struct zoran *zr = fh->zr; struct zoran *zr = fh->zr;
dprintk(2, KERN_INFO "%s: zoran_close(%s, pid=[%d]), users(+)=%d\n", dprintk(2, KERN_INFO "%s: %s(%s, pid=[%d]), users(+)=%d\n",
ZR_DEVNAME(zr), current->comm, task_pid_nr(current), zr->user - 1); ZR_DEVNAME(zr), __func__, current->comm, task_pid_nr(current), zr->user - 1);
/* kernel locks (fs/device.c), so don't do that ourselves /* kernel locks (fs/device.c), so don't do that ourselves
* (prevents deadlocks) */ * (prevents deadlocks) */
...@@ -1029,7 +1029,7 @@ zoran_close(struct file *file) ...@@ -1029,7 +1029,7 @@ zoran_close(struct file *file)
kfree(fh->overlay_mask); kfree(fh->overlay_mask);
kfree(fh); kfree(fh);
dprintk(4, KERN_INFO "%s: zoran_close() done\n", ZR_DEVNAME(zr)); dprintk(4, KERN_INFO "%s: %s done\n", ZR_DEVNAME(zr), __func__);
return 0; return 0;
} }
...@@ -1091,8 +1091,8 @@ static int setup_fbuffer(struct zoran_fh *fh, ...@@ -1091,8 +1091,8 @@ static int setup_fbuffer(struct zoran_fh *fh,
* friendly and silently do as if nothing went wrong */ * friendly and silently do as if nothing went wrong */
dprintk(3, dprintk(3,
KERN_ERR KERN_ERR
"%s: setup_fbuffer() - forced overlay turnoff because framebuffer changed\n", "%s: %s - forced overlay turnoff because framebuffer changed\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
zr36057_overlay(zr, 0); zr36057_overlay(zr, 0);
} }
#endif #endif
...@@ -1100,22 +1100,22 @@ static int setup_fbuffer(struct zoran_fh *fh, ...@@ -1100,22 +1100,22 @@ static int setup_fbuffer(struct zoran_fh *fh,
if (!(fmt->flags & ZORAN_FORMAT_OVERLAY)) { if (!(fmt->flags & ZORAN_FORMAT_OVERLAY)) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: setup_fbuffer() - no valid overlay format given\n", "%s: %s - no valid overlay format given\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
return -EINVAL; return -EINVAL;
} }
if (height <= 0 || width <= 0 || bytesperline <= 0) { if (height <= 0 || width <= 0 || bytesperline <= 0) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: setup_fbuffer() - invalid height/width/bpl value (%d|%d|%d)\n", "%s: %s - invalid height/width/bpl value (%d|%d|%d)\n",
ZR_DEVNAME(zr), width, height, bytesperline); ZR_DEVNAME(zr), __func__, width, height, bytesperline);
return -EINVAL; return -EINVAL;
} }
if (bytesperline & 3) { if (bytesperline & 3) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: setup_fbuffer() - bytesperline (%d) must be 4-byte aligned\n", "%s: %s - bytesperline (%d) must be 4-byte aligned\n",
ZR_DEVNAME(zr), bytesperline); ZR_DEVNAME(zr), __func__, bytesperline);
return -EINVAL; return -EINVAL;
} }
...@@ -1144,16 +1144,16 @@ static int setup_window(struct zoran_fh *fh, int x, int y, int width, int height ...@@ -1144,16 +1144,16 @@ static int setup_window(struct zoran_fh *fh, int x, int y, int width, int height
if (!zr->vbuf_base) { if (!zr->vbuf_base) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: setup_window() - frame buffer has to be set first\n", "%s: %s - frame buffer has to be set first\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
return -EINVAL; return -EINVAL;
} }
if (!fh->overlay_settings.format) { if (!fh->overlay_settings.format) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: setup_window() - no overlay format set\n", "%s: %s - no overlay format set\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
return -EINVAL; return -EINVAL;
} }
...@@ -1183,8 +1183,8 @@ static int setup_window(struct zoran_fh *fh, int x, int y, int width, int height ...@@ -1183,8 +1183,8 @@ static int setup_window(struct zoran_fh *fh, int x, int y, int width, int height
width > BUZ_MAX_WIDTH || height > BUZ_MAX_HEIGHT) { width > BUZ_MAX_WIDTH || height > BUZ_MAX_HEIGHT) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: setup_window() - width = %d or height = %d invalid\n", "%s: %s - width = %d or height = %d invalid\n",
ZR_DEVNAME(zr), width, height); ZR_DEVNAME(zr), __func__, width, height);
return -EINVAL; return -EINVAL;
} }
...@@ -1226,8 +1226,8 @@ static int setup_window(struct zoran_fh *fh, int x, int y, int width, int height ...@@ -1226,8 +1226,8 @@ static int setup_window(struct zoran_fh *fh, int x, int y, int width, int height
if (vcp == NULL) { if (vcp == NULL) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: setup_window() - Alloc of clip mask failed\n", "%s: %s - Alloc of clip mask failed\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
return -ENOMEM; return -ENOMEM;
} }
if (copy_from_user if (copy_from_user
...@@ -1265,16 +1265,16 @@ static int setup_overlay(struct zoran_fh *fh, int on) ...@@ -1265,16 +1265,16 @@ static int setup_overlay(struct zoran_fh *fh, int on)
fh->overlay_active == ZORAN_FREE) { fh->overlay_active == ZORAN_FREE) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: setup_overlay() - overlay is already active for another session\n", "%s: %s - overlay is already active for another session\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
return -EBUSY; return -EBUSY;
} }
if (!on && zr->overlay_active != ZORAN_FREE && if (!on && zr->overlay_active != ZORAN_FREE &&
fh->overlay_active == ZORAN_FREE) { fh->overlay_active == ZORAN_FREE) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: setup_overlay() - you cannot cancel someone else's session\n", "%s: %s - you cannot cancel someone else's session\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
return -EPERM; return -EPERM;
} }
...@@ -1290,15 +1290,15 @@ static int setup_overlay(struct zoran_fh *fh, int on) ...@@ -1290,15 +1290,15 @@ static int setup_overlay(struct zoran_fh *fh, int on)
if (!zr->vbuf_base || !fh->overlay_settings.is_set) { if (!zr->vbuf_base || !fh->overlay_settings.is_set) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: setup_overlay() - buffer or window not set\n", "%s: %s - buffer or window not set\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
return -EINVAL; return -EINVAL;
} }
if (!fh->overlay_settings.format) { if (!fh->overlay_settings.format) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: setup_overlay() - no overlay format set\n", "%s: %s - no overlay format set\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
return -EINVAL; return -EINVAL;
} }
zr->overlay_active = fh->overlay_active = ZORAN_LOCKED; zr->overlay_active = fh->overlay_active = ZORAN_LOCKED;
...@@ -1331,8 +1331,8 @@ static int zoran_v4l2_buffer_status(struct zoran_fh *fh, ...@@ -1331,8 +1331,8 @@ static int zoran_v4l2_buffer_status(struct zoran_fh *fh,
!fh->buffers.allocated) { !fh->buffers.allocated) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: v4l2_buffer_status() - wrong number or buffers not allocated\n", "%s: %s - wrong number or buffers not allocated\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
return -EINVAL; return -EINVAL;
} }
...@@ -1375,8 +1375,8 @@ static int zoran_v4l2_buffer_status(struct zoran_fh *fh, ...@@ -1375,8 +1375,8 @@ static int zoran_v4l2_buffer_status(struct zoran_fh *fh,
!fh->buffers.allocated) { !fh->buffers.allocated) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: v4l2_buffer_status() - wrong number or buffers not allocated\n", "%s: %s - wrong number or buffers not allocated\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
return -EINVAL; return -EINVAL;
} }
...@@ -1410,8 +1410,8 @@ static int zoran_v4l2_buffer_status(struct zoran_fh *fh, ...@@ -1410,8 +1410,8 @@ static int zoran_v4l2_buffer_status(struct zoran_fh *fh,
dprintk(5, dprintk(5,
KERN_ERR KERN_ERR
"%s: v4l2_buffer_status() - invalid buffer type|map_mode (%d|%d)\n", "%s: %s - invalid buffer type|map_mode (%d|%d)\n",
ZR_DEVNAME(zr), buf->type, fh->map_mode); ZR_DEVNAME(zr), __func__, buf->type, fh->map_mode);
return -EINVAL; return -EINVAL;
} }
...@@ -1432,15 +1432,15 @@ zoran_set_norm (struct zoran *zr, ...@@ -1432,15 +1432,15 @@ zoran_set_norm (struct zoran *zr,
zr->jpg_buffers.active != ZORAN_FREE) { zr->jpg_buffers.active != ZORAN_FREE) {
dprintk(1, dprintk(1,
KERN_WARNING KERN_WARNING
"%s: set_norm() called while in playback/capture mode\n", "%s: %s called while in playback/capture mode\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
return -EBUSY; return -EBUSY;
} }
if (!(norm & zr->card.norms)) { if (!(norm & zr->card.norms)) {
dprintk(1, dprintk(1,
KERN_ERR "%s: set_norm() - unsupported norm %llx\n", KERN_ERR "%s: %s - unsupported norm %llx\n",
ZR_DEVNAME(zr), norm); ZR_DEVNAME(zr), __func__, norm);
return -EINVAL; return -EINVAL;
} }
...@@ -1458,8 +1458,8 @@ zoran_set_norm (struct zoran *zr, ...@@ -1458,8 +1458,8 @@ zoran_set_norm (struct zoran *zr,
if (status & V4L2_IN_ST_NO_SIGNAL) { if (status & V4L2_IN_ST_NO_SIGNAL) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: set_norm() - no norm detected\n", "%s: %s - no norm detected\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
/* reset norm */ /* reset norm */
decoder_s_std(zr, zr->norm); decoder_s_std(zr, zr->norm);
return -EIO; return -EIO;
...@@ -1506,16 +1506,16 @@ zoran_set_input (struct zoran *zr, ...@@ -1506,16 +1506,16 @@ zoran_set_input (struct zoran *zr,
zr->jpg_buffers.active != ZORAN_FREE) { zr->jpg_buffers.active != ZORAN_FREE) {
dprintk(1, dprintk(1,
KERN_WARNING KERN_WARNING
"%s: set_input() called while in playback/capture mode\n", "%s: %s called while in playback/capture mode\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
return -EBUSY; return -EBUSY;
} }
if (input < 0 || input >= zr->card.inputs) { if (input < 0 || input >= zr->card.inputs) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: set_input() - unnsupported input %d\n", "%s: %s - unnsupported input %d\n",
ZR_DEVNAME(zr), input); ZR_DEVNAME(zr), __func__, input);
return -EINVAL; return -EINVAL;
} }
...@@ -3101,8 +3101,8 @@ zoran_poll (struct file *file, ...@@ -3101,8 +3101,8 @@ zoran_poll (struct file *file,
default: default:
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: zoran_poll() - internal error, unknown map_mode=%d\n", "%s: %s - internal error, unknown map_mode=%d\n",
ZR_DEVNAME(zr), fh->map_mode); ZR_DEVNAME(zr), __func__, fh->map_mode);
res = POLLNVAL; res = POLLNVAL;
} }
...@@ -3205,16 +3205,16 @@ zoran_mmap (struct file *file, ...@@ -3205,16 +3205,16 @@ zoran_mmap (struct file *file,
int res = 0; int res = 0;
dprintk(3, dprintk(3,
KERN_INFO "%s: mmap(%s) of 0x%08lx-0x%08lx (size=%lu)\n", KERN_INFO "%s: %s(%s) of 0x%08lx-0x%08lx (size=%lu)\n",
ZR_DEVNAME(zr), ZR_DEVNAME(zr), __func__,
mode_name(fh->map_mode), vma->vm_start, vma->vm_end, size); mode_name(fh->map_mode), vma->vm_start, vma->vm_end, size);
if (!(vma->vm_flags & VM_SHARED) || !(vma->vm_flags & VM_READ) || if (!(vma->vm_flags & VM_SHARED) || !(vma->vm_flags & VM_READ) ||
!(vma->vm_flags & VM_WRITE)) { !(vma->vm_flags & VM_WRITE)) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: mmap() - no MAP_SHARED/PROT_{READ,WRITE} given\n", "%s: %s - no MAP_SHARED/PROT_{READ,WRITE} given\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
return -EINVAL; return -EINVAL;
} }
...@@ -3223,8 +3223,8 @@ zoran_mmap (struct file *file, ...@@ -3223,8 +3223,8 @@ zoran_mmap (struct file *file,
if (!fh->buffers.allocated) { if (!fh->buffers.allocated) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: zoran_mmap(%s) - buffers not yet allocated\n", "%s: %s(%s) - buffers not yet allocated\n",
ZR_DEVNAME(zr), mode_name(fh->map_mode)); ZR_DEVNAME(zr), __func__, mode_name(fh->map_mode));
res = -ENOMEM; res = -ENOMEM;
goto mmap_unlock_and_return; goto mmap_unlock_and_return;
} }
...@@ -3237,8 +3237,8 @@ zoran_mmap (struct file *file, ...@@ -3237,8 +3237,8 @@ zoran_mmap (struct file *file,
last >= fh->buffers.buffer_size) { last >= fh->buffers.buffer_size) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: mmap(%s) - offset=%lu or size=%lu invalid for bufsize=%d and numbufs=%d\n", "%s: %s(%s) - offset=%lu or size=%lu invalid for bufsize=%d and numbufs=%d\n",
ZR_DEVNAME(zr), mode_name(fh->map_mode), offset, size, ZR_DEVNAME(zr), __func__, mode_name(fh->map_mode), offset, size,
fh->buffers.buffer_size, fh->buffers.buffer_size,
fh->buffers.num_buffers); fh->buffers.num_buffers);
res = -EINVAL; res = -EINVAL;
...@@ -3250,8 +3250,8 @@ zoran_mmap (struct file *file, ...@@ -3250,8 +3250,8 @@ zoran_mmap (struct file *file,
if (fh->buffers.buffer[i].map) { if (fh->buffers.buffer[i].map) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: mmap(%s) - buffer %d already mapped\n", "%s: %s(%s) - buffer %d already mapped\n",
ZR_DEVNAME(zr), mode_name(fh->map_mode), i); ZR_DEVNAME(zr), __func__, mode_name(fh->map_mode), i);
res = -EBUSY; res = -EBUSY;
goto mmap_unlock_and_return; goto mmap_unlock_and_return;
} }
...@@ -3280,8 +3280,8 @@ zoran_mmap (struct file *file, ...@@ -3280,8 +3280,8 @@ zoran_mmap (struct file *file,
todo, PAGE_SHARED)) { todo, PAGE_SHARED)) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: zoran_mmap(V4L) - remap_pfn_range failed\n", "%s: %s(V4L) - remap_pfn_range failed\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
res = -EAGAIN; res = -EAGAIN;
goto mmap_unlock_and_return; goto mmap_unlock_and_return;
} }
...@@ -3312,8 +3312,8 @@ zoran_mmap (struct file *file, ...@@ -3312,8 +3312,8 @@ zoran_mmap (struct file *file,
todo, PAGE_SHARED)) { todo, PAGE_SHARED)) {
dprintk(1, dprintk(1,
KERN_ERR KERN_ERR
"%s: zoran_mmap(V4L) - remap_pfn_range failed\n", "%s: %s(V4L) - remap_pfn_range failed\n",
ZR_DEVNAME(zr)); ZR_DEVNAME(zr), __func__);
res = -EAGAIN; res = -EAGAIN;
goto mmap_unlock_and_return; goto mmap_unlock_and_return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment