]> err.no Git - linux-2.6/commitdiff
[PATCH] Add i2c_bus_type probe and remove methods
authorRussell King <rmk@arm.linux.org.uk>
Thu, 5 Jan 2006 14:37:50 +0000 (14:37 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 13 Jan 2006 19:26:07 +0000 (11:26 -0800)
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/i2c/i2c-core.c

index 52b77477df573232730bbdae37ccd61d53beba22..0ce58b506046b458edb85cf7bda4472a56920da1 100644 (file)
@@ -63,13 +63,6 @@ static int i2c_bus_resume(struct device * dev)
        return rc;
 }
 
-struct bus_type i2c_bus_type = {
-       .name =         "i2c",
-       .match =        i2c_device_match,
-       .suspend =      i2c_bus_suspend,
-       .resume =       i2c_bus_resume,
-};
-
 static int i2c_device_probe(struct device *dev)
 {
        return -ENODEV;
@@ -80,6 +73,15 @@ static int i2c_device_remove(struct device *dev)
        return 0;
 }
 
+struct bus_type i2c_bus_type = {
+       .name =         "i2c",
+       .match =        i2c_device_match,
+       .probe =        i2c_device_probe,
+       .remove =       i2c_device_remove,
+       .suspend =      i2c_bus_suspend,
+       .resume =       i2c_bus_resume,
+};
+
 void i2c_adapter_dev_release(struct device *dev)
 {
        struct i2c_adapter *adap = dev_to_i2c_adapter(dev);
@@ -90,8 +92,6 @@ struct device_driver i2c_adapter_driver = {
        .owner = THIS_MODULE,
        .name = "i2c_adapter",
        .bus = &i2c_bus_type,
-       .probe = i2c_device_probe,
-       .remove = i2c_device_remove,
 };
 
 static void i2c_adapter_class_dev_release(struct class_device *dev)
@@ -294,8 +294,6 @@ int i2c_register_driver(struct module *owner, struct i2c_driver *driver)
        /* add the driver to the list of i2c drivers in the driver core */
        driver->driver.owner = owner;
        driver->driver.bus = &i2c_bus_type;
-       driver->driver.probe = i2c_device_probe;
-       driver->driver.remove = i2c_device_remove;
 
        res = driver_register(&driver->driver);
        if (res)