Commit 28ea0148 authored by Corentin Labbe's avatar Corentin Labbe Committed by Mauro Carvalho Chehab

media: zoran: convert dprintk warn

This patch convert dprintk(warn) to pci_warn.
Signed-off-by: default avatarCorentin Labbe <clabbe@baylibre.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent b7c3b2bb
...@@ -938,19 +938,14 @@ static int zr36057_init(struct zoran *zr) ...@@ -938,19 +938,14 @@ static int zr36057_init(struct zoran *zr)
zr->timing = zr->card.tvn[2]; zr->timing = zr->card.tvn[2];
} }
if (!zr->timing) { if (!zr->timing) {
dprintk(1, pci_warn(zr->pci_dev, "%s - default TV standard not supported by hardware. PAL will be used.\n", __func__);
KERN_WARNING
"%s: %s - default TV standard not supported by hardware. PAL will be used.\n",
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];
} }
if (default_input > zr->card.inputs - 1) { if (default_input > zr->card.inputs - 1) {
dprintk(1, pci_warn(zr->pci_dev, "default_input value %d out of range (0-%d)\n",
KERN_WARNING default_input, zr->card.inputs - 1);
"%s: default_input value %d out of range (0-%d)\n",
ZR_DEVNAME(zr), default_input, zr->card.inputs - 1);
default_input = 0; default_input = 0;
} }
zr->input = default_input; zr->input = default_input;
...@@ -1378,11 +1373,8 @@ static int __init zoran_init(void) ...@@ -1378,11 +1373,8 @@ static int __init zoran_init(void)
} }
/* some mainboards might not do PCI-PCI data transfer well */ /* some mainboards might not do PCI-PCI data transfer well */
if (pci_pci_problems & (PCIPCI_FAIL | PCIAGP_FAIL | PCIPCI_ALIMAGIK)) { if (pci_pci_problems & (PCIPCI_FAIL | PCIAGP_FAIL | PCIPCI_ALIMAGIK))
dprintk(1, pr_warn("%s: chipset does not support reliable PCI-PCI DMA\n", ZORAN_NAME);
KERN_WARNING
"%s: chipset does not support reliable PCI-PCI DMA\n", ZORAN_NAME);
}
res = pci_register_driver(&zoran_driver); res = pci_register_driver(&zoran_driver);
if (res) { if (res) {
......
...@@ -547,10 +547,7 @@ void zr36057_set_memgrab(struct zoran *zr, int mode) ...@@ -547,10 +547,7 @@ void zr36057_set_memgrab(struct zoran *zr, int mode)
* will be stuck at 1 until capturing is turned back on. * will be stuck at 1 until capturing is turned back on.
*/ */
if (btread(ZR36057_VSSFGR) & ZR36057_VSSFGR_SnapShot) if (btread(ZR36057_VSSFGR) & ZR36057_VSSFGR_SnapShot)
dprintk(1, pci_warn(zr->pci_dev, "zr36057_set_memgrab(1) with SnapShot on!?\n");
KERN_WARNING
"%s: zr36057_set_memgrab(1) with SnapShot on!?\n",
ZR_DEVNAME(zr));
/* switch on VSync interrupts */ /* switch on VSync interrupts */
btwrite(IRQ_MASK, ZR36057_ISR); // Clear Interrupts btwrite(IRQ_MASK, ZR36057_ISR); // Clear Interrupts
...@@ -1300,10 +1297,7 @@ irqreturn_t zoran_irq(int irq, void *dev_id) ...@@ -1300,10 +1297,7 @@ irqreturn_t zoran_irq(int irq, void *dev_id)
if (zr->v4l_memgrab_active) { if (zr->v4l_memgrab_active) {
/* A lot more checks should be here ... */ /* A lot more checks should be here ... */
if ((btread(ZR36057_VSSFGR) & ZR36057_VSSFGR_SnapShot) == 0) if ((btread(ZR36057_VSSFGR) & ZR36057_VSSFGR_SnapShot) == 0)
dprintk(1, pci_warn(zr->pci_dev, "BuzIRQ with SnapShot off ???\n");
KERN_WARNING
"%s: BuzIRQ with SnapShot off ???\n",
ZR_DEVNAME(zr));
if (zr->v4l_grab_frame != NO_GRAB_ACTIVE) { if (zr->v4l_grab_frame != NO_GRAB_ACTIVE) {
/* There is a grab on a frame going on, check if it has finished */ /* There is a grab on a frame going on, check if it has finished */
...@@ -1422,8 +1416,7 @@ irqreturn_t zoran_irq(int irq, void *dev_id) ...@@ -1422,8 +1416,7 @@ irqreturn_t zoran_irq(int irq, void *dev_id)
count++; count++;
if (count > 10) { if (count > 10) {
dprintk(2, KERN_WARNING "%s: irq loop %d\n", pci_warn(zr->pci_dev, "irq loop %d\n", count);
ZR_DEVNAME(zr), count);
if (count > 20) { if (count > 20) {
btand(~ZR36057_ICR_IntPinEn, ZR36057_ICR); btand(~ZR36057_ICR_IntPinEn, ZR36057_ICR);
pci_err(zr->pci_dev, "IRQ lockup, cleared int mask\n"); pci_err(zr->pci_dev, "IRQ lockup, cleared int mask\n");
......
...@@ -210,10 +210,7 @@ static int v4l_fbuffer_alloc(struct zoran_fh *fh) ...@@ -210,10 +210,7 @@ static int v4l_fbuffer_alloc(struct zoran_fh *fh)
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)
dprintk(2, pci_warn(zr->pci_dev, "%s - buffer %d already allocated!?\n", __func__, i);
KERN_WARNING
"%s: %s - buffer %d already allocated!?\n",
ZR_DEVNAME(zr), __func__, i);
//udelay(20); //udelay(20);
mem = kmalloc(fh->buffers.buffer_size, GFP_KERNEL | __GFP_NOWARN); mem = kmalloc(fh->buffers.buffer_size, GFP_KERNEL | __GFP_NOWARN);
...@@ -300,10 +297,7 @@ static int jpg_fbuffer_alloc(struct zoran_fh *fh) ...@@ -300,10 +297,7 @@ static int jpg_fbuffer_alloc(struct zoran_fh *fh)
for (i = 0; i < fh->buffers.num_buffers; i++) { for (i = 0; i < fh->buffers.num_buffers; i++) {
if (fh->buffers.buffer[i].jpg.frag_tab) if (fh->buffers.buffer[i].jpg.frag_tab)
dprintk(2, pci_warn(zr->pci_dev, "%s - buffer %d already allocated!?\n", __func__, i);
KERN_WARNING
"%s: %s - buffer %d already allocated!?\n",
ZR_DEVNAME(zr), __func__, i);
/* Allocate fragment table for this buffer */ /* Allocate fragment table for this buffer */
...@@ -490,10 +484,7 @@ static int zoran_v4l_queue_frame(struct zoran_fh *fh, int num) ...@@ -490,10 +484,7 @@ static int zoran_v4l_queue_frame(struct zoran_fh *fh, int num)
res = -EBUSY; /* what are you doing? */ res = -EBUSY; /* what are you doing? */
break; break;
case BUZ_STATE_DONE: case BUZ_STATE_DONE:
dprintk(2, pci_warn(zr->pci_dev, "%s - queueing buffer %d in state DONE!?\n", __func__, num);
KERN_WARNING
"%s: %s - queueing buffer %d in state DONE!?\n",
ZR_DEVNAME(zr), __func__, num);
/* fallthrough */ /* fallthrough */
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
...@@ -627,10 +618,7 @@ static int zoran_jpg_queue_frame(struct zoran_fh *fh, int num, ...@@ -627,10 +618,7 @@ static int zoran_jpg_queue_frame(struct zoran_fh *fh, int num,
if (!res) { if (!res) {
switch (zr->jpg_buffers.buffer[num].state) { switch (zr->jpg_buffers.buffer[num].state) {
case BUZ_STATE_DONE: case BUZ_STATE_DONE:
dprintk(2, pci_warn(zr->pci_dev, "%s - queuing frame in BUZ_STATE_DONE state!?\n", __func__);
KERN_WARNING
"%s: %s - queuing frame in BUZ_STATE_DONE state!?\n",
ZR_DEVNAME(zr), __func__);
/* fallthrough */ /* fallthrough */
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
...@@ -1330,10 +1318,7 @@ static int zoran_set_input(struct zoran *zr, int input) ...@@ -1330,10 +1318,7 @@ static int zoran_set_input(struct zoran *zr, int input)
if (zr->v4l_buffers.active != ZORAN_FREE || if (zr->v4l_buffers.active != ZORAN_FREE ||
zr->jpg_buffers.active != ZORAN_FREE) { zr->jpg_buffers.active != ZORAN_FREE) {
dprintk(1, pci_warn(zr->pci_dev, "%s called while in playback/capture mode\n", __func__);
KERN_WARNING
"%s: %s called while in playback/capture mode\n",
ZR_DEVNAME(zr), __func__);
return -EBUSY; return -EBUSY;
} }
...@@ -2294,9 +2279,7 @@ static int zoran_s_jpegcomp(struct file *file, void *__fh, ...@@ -2294,9 +2279,7 @@ static int zoran_s_jpegcomp(struct file *file, void *__fh,
settings.jpg_comp = *params; settings.jpg_comp = *params;
if (fh->buffers.active != ZORAN_FREE) { if (fh->buffers.active != ZORAN_FREE) {
dprintk(1, KERN_WARNING pci_warn(zr->pci_dev, "VIDIOC_S_JPEGCOMP called while in playback/capture mode\n");
"%s: VIDIOC_S_JPEGCOMP called while in playback/capture mode\n",
ZR_DEVNAME(zr));
res = -EBUSY; res = -EBUSY;
return res; return res;
} }
......
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