aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2007-05-01 17:26:28 -0400
committerJean Delvare <khali@hyperion.delvare>2007-05-01 17:26:28 -0400
commitb31366f4394f7b1e8e1726ba049f294934db4495 (patch)
treebd9a676864adaac9026ed36ce7398d15418ea47b /drivers
parentfccb56e4d82132ac15359efc9e419371e4533437 (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')
-rw-r--r--drivers/i2c/busses/i2c-isa.c1
-rw-r--r--drivers/i2c/i2c-core.c14
2 files changed, 1 insertions, 14 deletions
diff --git a/drivers/i2c/busses/i2c-isa.c b/drivers/i2c/busses/i2c-isa.c
index a2e75bc9178b..745830bb8e2b 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)
139 isa_adapter.nr = ANY_I2C_ISA_BUS; 139 isa_adapter.nr = ANY_I2C_ISA_BUS;
140 isa_adapter.dev.parent = &platform_bus; 140 isa_adapter.dev.parent = &platform_bus;
141 sprintf(isa_adapter.dev.bus_id, "i2c-%d", isa_adapter.nr); 141 sprintf(isa_adapter.dev.bus_id, "i2c-%d", isa_adapter.nr);
142 isa_adapter.dev.driver = &i2c_adapter_driver;
143 isa_adapter.dev.release = &i2c_adapter_dev_release; 142 isa_adapter.dev.release = &i2c_adapter_dev_release;
144 isa_adapter.dev.class = &i2c_adapter_class; 143 isa_adapter.dev.class = &i2c_adapter_class;
145 err = device_register(&isa_adapter.dev); 144 err = device_register(&isa_adapter.dev);
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 40a744d73e8c..8dca4848ad92 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
116struct 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
586static void __exit i2c_exit(void) 576static 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 */
1178EXPORT_SYMBOL_GPL(i2c_adapter_dev_release); 1167EXPORT_SYMBOL_GPL(i2c_adapter_dev_release);
1179EXPORT_SYMBOL_GPL(i2c_adapter_driver);
1180EXPORT_SYMBOL_GPL(i2c_adapter_class); 1168EXPORT_SYMBOL_GPL(i2c_adapter_class);
1181EXPORT_SYMBOL_GPL(i2c_bus_type); 1169EXPORT_SYMBOL_GPL(i2c_bus_type);
1182 1170