aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/i2c-core.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 52b77477df57..0ce58b506046 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -63,13 +63,6 @@ static int i2c_bus_resume(struct device * dev)
63 return rc; 63 return rc;
64} 64}
65 65
66struct bus_type i2c_bus_type = {
67 .name = "i2c",
68 .match = i2c_device_match,
69 .suspend = i2c_bus_suspend,
70 .resume = i2c_bus_resume,
71};
72
73static int i2c_device_probe(struct device *dev) 66static int i2c_device_probe(struct device *dev)
74{ 67{
75 return -ENODEV; 68 return -ENODEV;
@@ -80,6 +73,15 @@ static int i2c_device_remove(struct device *dev)
80 return 0; 73 return 0;
81} 74}
82 75
76struct bus_type i2c_bus_type = {
77 .name = "i2c",
78 .match = i2c_device_match,
79 .probe = i2c_device_probe,
80 .remove = i2c_device_remove,
81 .suspend = i2c_bus_suspend,
82 .resume = i2c_bus_resume,
83};
84
83void i2c_adapter_dev_release(struct device *dev) 85void i2c_adapter_dev_release(struct device *dev)
84{ 86{
85 struct i2c_adapter *adap = dev_to_i2c_adapter(dev); 87 struct i2c_adapter *adap = dev_to_i2c_adapter(dev);
@@ -90,8 +92,6 @@ struct device_driver i2c_adapter_driver = {
90 .owner = THIS_MODULE, 92 .owner = THIS_MODULE,
91 .name = "i2c_adapter", 93 .name = "i2c_adapter",
92 .bus = &i2c_bus_type, 94 .bus = &i2c_bus_type,
93 .probe = i2c_device_probe,
94 .remove = i2c_device_remove,
95}; 95};
96 96
97static void i2c_adapter_class_dev_release(struct class_device *dev) 97static 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)
294 /* add the driver to the list of i2c drivers in the driver core */ 294 /* add the driver to the list of i2c drivers in the driver core */
295 driver->driver.owner = owner; 295 driver->driver.owner = owner;
296 driver->driver.bus = &i2c_bus_type; 296 driver->driver.bus = &i2c_bus_type;
297 driver->driver.probe = i2c_device_probe;
298 driver->driver.remove = i2c_device_remove;
299 297
300 res = driver_register(&driver->driver); 298 res = driver_register(&driver->driver);
301 if (res) 299 if (res)