mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 19:56:18 +00:00
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>
This commit is contained in:
parent
c758e8cffe
commit
935298696f
1 changed files with 1 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue