diff options
author | Jean Delvare <khali@linux-fr.org> | 2007-05-01 17:26:28 -0400 |
---|---|---|
committer | Jean Delvare <khali@hyperion.delvare> | 2007-05-01 17:26:28 -0400 |
commit | b31366f4394f7b1e8e1726ba049f294934db4495 (patch) | |
tree | bd9a676864adaac9026ed36ce7398d15418ea47b /drivers/i2c/i2c-core.c | |
parent | fccb56e4d82132ac15359efc9e419371e4533437 (diff) |
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 <khali@linux-fr.org>
Diffstat (limited to 'drivers/i2c/i2c-core.c')
-rw-r--r-- | drivers/i2c/i2c-core.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 40a744d73e8..8dca4848ad9 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) | |||
113 | complete(&adap->dev_released); | 113 | complete(&adap->dev_released); |
114 | } | 114 | } |
115 | 115 | ||
116 | struct device_driver i2c_adapter_driver = { | ||
117 | .owner = THIS_MODULE, | ||
118 | .name = "i2c_adapter", | ||
119 | .bus = &i2c_bus_type, | ||
120 | }; | ||
121 | |||
122 | /* ------------------------------------------------------------------------- */ | 116 | /* ------------------------------------------------------------------------- */ |
123 | 117 | ||
124 | /* I2C bus adapters -- one roots each I2C or SMBUS segment */ | 118 | /* I2C bus adapters -- one roots each I2C or SMBUS segment */ |
@@ -202,7 +196,6 @@ int i2c_add_adapter(struct i2c_adapter *adap) | |||
202 | "physical device\n", adap->name); | 196 | "physical device\n", adap->name); |
203 | } | 197 | } |
204 | sprintf(adap->dev.bus_id, "i2c-%d", adap->nr); | 198 | sprintf(adap->dev.bus_id, "i2c-%d", adap->nr); |
205 | adap->dev.driver = &i2c_adapter_driver; | ||
206 | adap->dev.release = &i2c_adapter_dev_release; | 199 | adap->dev.release = &i2c_adapter_dev_release; |
207 | adap->dev.class = &i2c_adapter_class; | 200 | adap->dev.class = &i2c_adapter_class; |
208 | res = device_register(&adap->dev); | 201 | res = device_register(&adap->dev); |
@@ -577,16 +570,12 @@ static int __init i2c_init(void) | |||
577 | retval = bus_register(&i2c_bus_type); | 570 | retval = bus_register(&i2c_bus_type); |
578 | if (retval) | 571 | if (retval) |
579 | return retval; | 572 | return retval; |
580 | retval = driver_register(&i2c_adapter_driver); | ||
581 | if (retval) | ||
582 | return retval; | ||
583 | return class_register(&i2c_adapter_class); | 573 | return class_register(&i2c_adapter_class); |
584 | } | 574 | } |
585 | 575 | ||
586 | static void __exit i2c_exit(void) | 576 | static void __exit i2c_exit(void) |
587 | { | 577 | { |
588 | class_unregister(&i2c_adapter_class); | 578 | class_unregister(&i2c_adapter_class); |
589 | driver_unregister(&i2c_adapter_driver); | ||
590 | bus_unregister(&i2c_bus_type); | 579 | bus_unregister(&i2c_bus_type); |
591 | } | 580 | } |
592 | 581 | ||
@@ -1174,9 +1163,8 @@ s32 i2c_smbus_xfer(struct i2c_adapter * adapter, u16 addr, unsigned short flags, | |||
1174 | } | 1163 | } |
1175 | 1164 | ||
1176 | 1165 | ||
1177 | /* Next four are needed by i2c-isa */ | 1166 | /* Next three are needed by i2c-isa */ |
1178 | EXPORT_SYMBOL_GPL(i2c_adapter_dev_release); | 1167 | EXPORT_SYMBOL_GPL(i2c_adapter_dev_release); |
1179 | EXPORT_SYMBOL_GPL(i2c_adapter_driver); | ||
1180 | EXPORT_SYMBOL_GPL(i2c_adapter_class); | 1168 | EXPORT_SYMBOL_GPL(i2c_adapter_class); |
1181 | EXPORT_SYMBOL_GPL(i2c_bus_type); | 1169 | EXPORT_SYMBOL_GPL(i2c_bus_type); |
1182 | 1170 | ||