fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / i2c / busses / i2c-voodoo3.c
index 3d4fad6..b0377b8 100644 (file)
@@ -27,7 +27,6 @@
 /* This interfaces to the I2C bus of the Voodoo3 to gain access to
     the BT869 and possibly other I2C devices. */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/init.h>
@@ -61,7 +60,7 @@
 #define TIMEOUT                (HZ / 2)
 
 
-static void *ioaddr;
+static void __iomem *ioaddr;
 
 /* The voo GPIO registers don't have individual masks for each bit
    so we always have to read before writing. */
@@ -161,13 +160,12 @@ static struct i2c_algo_bit_data voo_i2c_bit_data = {
        .getsda         = bit_vooi2c_getsda,
        .getscl         = bit_vooi2c_getscl,
        .udelay         = CYCLE_DELAY,
-       .mdelay         = CYCLE_DELAY,
        .timeout        = TIMEOUT
 };
 
 static struct i2c_adapter voodoo3_i2c_adapter = {
        .owner          = THIS_MODULE,
-       .class          = I2C_ADAP_CLASS_TV_ANALOG, 
+       .class          = I2C_CLASS_TV_ANALOG, 
        .name           = "I2C Voodoo3/Banshee adapter",
        .algo_data      = &voo_i2c_bit_data,
 };
@@ -178,13 +176,12 @@ static struct i2c_algo_bit_data voo_ddc_bit_data = {
        .getsda         = bit_vooddc_getsda,
        .getscl         = bit_vooddc_getscl,
        .udelay         = CYCLE_DELAY,
-       .mdelay         = CYCLE_DELAY,
        .timeout        = TIMEOUT
 };
 
 static struct i2c_adapter voodoo3_ddc_adapter = {
        .owner          = THIS_MODULE,
-       .class          = I2C_ADAP_CLASS_DDC, 
+       .class          = I2C_CLASS_DDC, 
        .name           = "DDC Voodoo3/Banshee adapter",
        .algo_data      = &voo_ddc_bit_data,
 };
@@ -195,6 +192,8 @@ static struct pci_device_id voodoo3_ids[] __devinitdata = {
        { 0, }
 };
 
+MODULE_DEVICE_TABLE (pci, voodoo3_ids);
+
 static int __devinit voodoo3_probe(struct pci_dev *dev, const struct pci_device_id *id)
 {
        int retval;
@@ -212,19 +211,19 @@ static int __devinit voodoo3_probe(struct pci_dev *dev, const struct pci_device_
                return retval;
        retval = i2c_bit_add_bus(&voodoo3_ddc_adapter);
        if (retval)
-               i2c_bit_del_bus(&voodoo3_i2c_adapter);
+               i2c_del_adapter(&voodoo3_i2c_adapter);
        return retval;
 }
 
 static void __devexit voodoo3_remove(struct pci_dev *dev)
 {
-       i2c_bit_del_bus(&voodoo3_i2c_adapter);
-       i2c_bit_del_bus(&voodoo3_ddc_adapter);
+       i2c_del_adapter(&voodoo3_i2c_adapter);
+       i2c_del_adapter(&voodoo3_ddc_adapter);
        iounmap(ioaddr);
 }
 
 static struct pci_driver voodoo3_driver = {
-       .name           = "voodoo3 smbus",
+       .name           = "voodoo3_smbus",
        .id_table       = voodoo3_ids,
        .probe          = voodoo3_probe,
        .remove         = __devexit_p(voodoo3_remove),
@@ -232,7 +231,7 @@ static struct pci_driver voodoo3_driver = {
 
 static int __init i2c_voodoo3_init(void)
 {
-       return pci_module_init(&voodoo3_driver);
+       return pci_register_driver(&voodoo3_driver);
 }
 
 static void __exit i2c_voodoo3_exit(void)