summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2009-04-13 17:02:14 +0200
committerJean Delvare <khali@linux-fr.org>2009-04-13 17:02:14 +0200
commit935298696f469c0e07c73be687bd055878074ce0 (patch)
tree0334918c9803c66f9c343246724fe09a6bc84608 /drivers
parentc758e8cffe3b1bc7970d579371db01b19ff440bf (diff)
downloadlinux-935298696f469c0e07c73be687bd055878074ce0.tar.gz
linux-935298696f469c0e07c73be687bd055878074ce0.tar.bz2
linux-935298696f469c0e07c73be687bd055878074ce0.zip
i2c: Let new-style drivers implement attach_adapter
While it isn't the way the standard device binding model works, it is OK for new-style drivers to implement attach_adapter. It may help convert the renaming legacy drivers to new style drivers faster. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/i2c/i2c-core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index b6f3a0de6ca2..85e2e919d1cd 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -716,8 +716,7 @@ int i2c_register_driver(struct module *owner, struct i2c_driver *driver)
/* new style driver methods can't mix with legacy ones */
if (is_newstyle_driver(driver)) {
- if (driver->attach_adapter || driver->detach_adapter
- || driver->detach_client) {
+ if (driver->detach_adapter || driver->detach_client) {
printk(KERN_WARNING
"i2c-core: driver [%s] is confused\n",
driver->driver.name);