aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-isa.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/busses/i2c-isa.c')
-rw-r--r--drivers/i2c/busses/i2c-isa.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/i2c/busses/i2c-isa.c b/drivers/i2c/busses/i2c-isa.c
index 03672c9ca409..9f2ffef4d812 100644
--- a/drivers/i2c/busses/i2c-isa.c
+++ b/drivers/i2c/busses/i2c-isa.c
@@ -92,15 +92,13 @@ int i2c_isa_add_driver(struct i2c_driver *driver)
92 int res; 92 int res;
93 93
94 /* Add the driver to the list of i2c drivers in the driver core */ 94 /* Add the driver to the list of i2c drivers in the driver core */
95 driver->driver.name = driver->name;
96 driver->driver.owner = driver->owner;
97 driver->driver.bus = &i2c_bus_type; 95 driver->driver.bus = &i2c_bus_type;
98 driver->driver.probe = i2c_isa_device_probe; 96 driver->driver.probe = i2c_isa_device_probe;
99 driver->driver.remove = i2c_isa_device_remove; 97 driver->driver.remove = i2c_isa_device_remove;
100 res = driver_register(&driver->driver); 98 res = driver_register(&driver->driver);
101 if (res) 99 if (res)
102 return res; 100 return res;
103 dev_dbg(&isa_adapter.dev, "Driver %s registered\n", driver->name); 101 dev_dbg(&isa_adapter.dev, "Driver %s registered\n", driver->driver.name);
104 102
105 /* Now look for clients */ 103 /* Now look for clients */
106 driver->attach_adapter(&isa_adapter); 104 driver->attach_adapter(&isa_adapter);
@@ -124,14 +122,14 @@ int i2c_isa_del_driver(struct i2c_driver *driver)
124 if ((res = driver->detach_client(client))) { 122 if ((res = driver->detach_client(client))) {
125 dev_err(&isa_adapter.dev, "Failed, driver " 123 dev_err(&isa_adapter.dev, "Failed, driver "
126 "%s not unregistered!\n", 124 "%s not unregistered!\n",
127 driver->name); 125 driver->driver.name);
128 return res; 126 return res;
129 } 127 }
130 } 128 }
131 129
132 /* Get the driver off the core list */ 130 /* Get the driver off the core list */
133 driver_unregister(&driver->driver); 131 driver_unregister(&driver->driver);
134 dev_dbg(&isa_adapter.dev, "Driver %s unregistered\n", driver->name); 132 dev_dbg(&isa_adapter.dev, "Driver %s unregistered\n", driver->driver.name);
135 133
136 return 0; 134 return 0;
137} 135}
@@ -176,7 +174,7 @@ static void __exit i2c_isa_exit(void)
176 list_for_each_safe(item, _n, &isa_adapter.clients) { 174 list_for_each_safe(item, _n, &isa_adapter.clients) {
177 client = list_entry(item, struct i2c_client, list); 175 client = list_entry(item, struct i2c_client, list);
178 dev_err(&isa_adapter.dev, "Driver %s still has an active " 176 dev_err(&isa_adapter.dev, "Driver %s still has an active "
179 "ISA client at 0x%x\n", client->driver->name, 177 "ISA client at 0x%x\n", client->driver->driver.name,
180 client->addr); 178 client->addr);
181 } 179 }
182 if (client != NULL) 180 if (client != NULL)