diff options
Diffstat (limited to 'v4l_experimental/v3tv/i2c-voodoo3.c')
-rw-r--r-- | v4l_experimental/v3tv/i2c-voodoo3.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/v4l_experimental/v3tv/i2c-voodoo3.c b/v4l_experimental/v3tv/i2c-voodoo3.c index b675773b0..3ec720f78 100644 --- a/v4l_experimental/v3tv/i2c-voodoo3.c +++ b/v4l_experimental/v3tv/i2c-voodoo3.c @@ -60,6 +60,7 @@ #define TIMEOUT (HZ / 2) +struct pci_dev *voodoo3_dev; static void __iomem *ioaddr; /* The voo GPIO registers don't have individual masks for each bit @@ -151,6 +152,7 @@ static int config_v3(struct pci_dev *dev) dev_info(&dev->dev, "Using Banshee/Voodoo3 I2C device at %p\n", ioaddr); return 0; } + printk(KERN_WARNING "i2c-voodoo3: !!! I2C device not found !!!"); return -ENODEV; } @@ -224,21 +226,35 @@ static void __devexit voodoo3_remove(struct pci_dev *dev) iounmap(ioaddr); } +/* static struct pci_driver voodoo3_driver = { .name = "voodoo3_smbus", .id_table = voodoo3_ids, .probe = voodoo3_probe, .remove = __devexit_p(voodoo3_remove), }; +*/ static int __init i2c_voodoo3_init(void) { - return pci_register_driver(&voodoo3_driver); +/* return pci_register_driver(&voodoo3_driver); */ + const struct pci_device_id *ids = voodoo3_ids; + + while (ids->vendor) { + if ((voodoo3_dev = pci_get_device(ids->vendor, ids->device, NULL))) + printk(KERN_ERR "i2c_voodoo3: dev->dev = %p", &voodoo3_dev->dev); + if (voodoo3_probe(voodoo3_dev, ids) >= 0) + return 0; + ids++; + } + return -ENODEV; } static void __exit i2c_voodoo3_exit(void) { - pci_unregister_driver(&voodoo3_driver); +/* pci_unregister_driver(&voodoo3_driver); */ + voodoo3_remove(voodoo3_dev); + pci_dev_put(voodoo3_dev); } |