[PATCH] i2c: Let new-style drivers implement attach_adapter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx>
Cc: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx>
---
Johannes, you'll need to apply this patch before you can test the
onyx/tas conversion patch I sent to you yesterday.

 drivers/i2c/i2c-core.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- linux-2.6.30-rc1.orig/drivers/i2c/i2c-core.c	2009-04-10 15:22:22.000000000 +0200
+++ linux-2.6.30-rc1/drivers/i2c/i2c-core.c	2009-04-10 15:31:19.000000000 +0200
@@ -716,8 +716,7 @@ int i2c_register_driver(struct module *o
 
 	/* 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);


-- 
Jean Delvare
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux