summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/zoran/zoran_card.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/zoran/zoran_card.c')
-rw-r--r--linux/drivers/media/video/zoran/zoran_card.c31
1 files changed, 8 insertions, 23 deletions
diff --git a/linux/drivers/media/video/zoran/zoran_card.c b/linux/drivers/media/video/zoran/zoran_card.c
index 925737e8f..fbac547d0 100644
--- a/linux/drivers/media/video/zoran/zoran_card.c
+++ b/linux/drivers/media/video/zoran/zoran_card.c
@@ -1278,7 +1278,10 @@ static int __devinit zoran_probe(struct pci_dev *pdev,
nr = atomic_inc_return(&zoran_num) - 1;
if (nr >= BUZ_MAX) {
- dev_err(&pdev->dev, "driver limited to %d card(s) maximum\n", BUZ_MAX);
+ dprintk(1,
+ KERN_ERR
+ "%s: driver limited to %d card(s) maximum\n",
+ ZORAN_NAME, BUZ_MAX);
return -ENOENT;
}
@@ -1565,29 +1568,21 @@ static int __devinit zoran_probe(struct pci_dev *pdev,
return 0;
- /* Init errors */
zr_detach_vfe:
videocodec_detach(zr->vfe);
-
zr_free_vfe:
kfree(master_vfe);
-
zr_detach_codec:
videocodec_detach(zr->codec);
-
zr_free_codec:
kfree(master_codec);
-
zr_unreg_i2c:
zoran_unregister_i2c(zr);
-
zr_free_irq:
btwrite(0, ZR36057_SPGPPCR);
free_irq(zr->pci_dev->irq, zr);
-
zr_unmap:
iounmap(zr->zr36057_mem);
-
zr_free_mem:
kfree(zr);
@@ -1603,7 +1598,7 @@ static struct pci_driver zoran_driver = {
static int __init zoran_init(void)
{
- int i;
+ int res;
memset(zoran, 0, sizeof(zoran));
printk(KERN_INFO "Zoran MJPEG board driver version %d.%d.%d\n",
@@ -1650,13 +1645,13 @@ static int __init zoran_init(void)
ZORAN_NAME);
}
- i = pci_register_driver(&zoran_driver);
- if (i) {
+ res = pci_register_driver(&zoran_driver);
+ if (res) {
dprintk(1,
KERN_ERR
"%s: Unable to register ZR36057 driver\n",
ZORAN_NAME);
- return i;
+ return res;
}
return 0;
@@ -1669,13 +1664,3 @@ static void __exit zoran_exit(void)
module_init(zoran_init);
module_exit(zoran_exit);
-
-/*
-todo:
- use pci ioremap functions
-
- use id table to provide card type
-
- get rid of zoran[] array
-*/
-