Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b31366f4394f7b1e8e1726ba049f294934db4495
Commit:     b31366f4394f7b1e8e1726ba049f294934db4495
Parent:     fccb56e4d82132ac15359efc9e419371e4533437
Author:     Jean Delvare <[EMAIL PROTECTED]>
AuthorDate: Tue May 1 23:26:28 2007 +0200
Committer:  Jean Delvare <[EMAIL PROTECTED]>
CommitDate: Tue May 1 23:26:28 2007 +0200

    i2c: i2c_adapter devices need no driver
    
    Kill i2c_adapter_driver as it doesn't make sense and it prevents
    further i2c-core cleanups. i2c_adapter devices are virtual devices
    (ex-class devices) and as such they don't need a driver.
    
    Signed-off-by: Jean Delvare <[EMAIL PROTECTED]>
---
 drivers/i2c/busses/i2c-isa.c |    1 -
 drivers/i2c/i2c-core.c       |   14 +-------------
 include/linux/i2c.h          |    1 -
 3 files changed, 1 insertions(+), 15 deletions(-)

diff --git a/drivers/i2c/busses/i2c-isa.c b/drivers/i2c/busses/i2c-isa.c
index a2e75bc..745830b 100644
--- a/drivers/i2c/busses/i2c-isa.c
+++ b/drivers/i2c/busses/i2c-isa.c
@@ -139,7 +139,6 @@ static int __init i2c_isa_init(void)
        isa_adapter.nr = ANY_I2C_ISA_BUS;
        isa_adapter.dev.parent = &platform_bus;
        sprintf(isa_adapter.dev.bus_id, "i2c-%d", isa_adapter.nr);
-       isa_adapter.dev.driver = &i2c_adapter_driver;
        isa_adapter.dev.release = &i2c_adapter_dev_release;
        isa_adapter.dev.class = &i2c_adapter_class;
        err = device_register(&isa_adapter.dev);
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 40a744d..8dca484 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -113,12 +113,6 @@ void i2c_adapter_dev_release(struct device *dev)
        complete(&adap->dev_released);
 }
 
-struct device_driver i2c_adapter_driver = {
-       .owner = THIS_MODULE,
-       .name = "i2c_adapter",
-       .bus = &i2c_bus_type,
-};
-
 /* ------------------------------------------------------------------------- */
 
 /* I2C bus adapters -- one roots each I2C or SMBUS segment */
@@ -202,7 +196,6 @@ int i2c_add_adapter(struct i2c_adapter *adap)
                         "physical device\n", adap->name);
        }
        sprintf(adap->dev.bus_id, "i2c-%d", adap->nr);
-       adap->dev.driver = &i2c_adapter_driver;
        adap->dev.release = &i2c_adapter_dev_release;
        adap->dev.class = &i2c_adapter_class;
        res = device_register(&adap->dev);
@@ -577,16 +570,12 @@ static int __init i2c_init(void)
        retval = bus_register(&i2c_bus_type);
        if (retval)
                return retval;
-       retval = driver_register(&i2c_adapter_driver);
-       if (retval)
-               return retval;
        return class_register(&i2c_adapter_class);
 }
 
 static void __exit i2c_exit(void)
 {
        class_unregister(&i2c_adapter_class);
-       driver_unregister(&i2c_adapter_driver);
        bus_unregister(&i2c_bus_type);
 }
 
@@ -1174,9 +1163,8 @@ s32 i2c_smbus_xfer(struct i2c_adapter * adapter, u16 
addr, unsigned short flags,
 }
 
 
-/* Next four are needed by i2c-isa */
+/* Next three are needed by i2c-isa */
 EXPORT_SYMBOL_GPL(i2c_adapter_dev_release);
-EXPORT_SYMBOL_GPL(i2c_adapter_driver);
 EXPORT_SYMBOL_GPL(i2c_adapter_class);
 EXPORT_SYMBOL_GPL(i2c_bus_type);
 
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 7a59dc6..47c2a19 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -38,7 +38,6 @@
 /* --- For i2c-isa ---------------------------------------------------- */
 
 extern void i2c_adapter_dev_release(struct device *dev);
-extern struct device_driver i2c_adapter_driver;
 extern struct class i2c_adapter_class;
 extern struct bus_type i2c_bus_type;
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to