linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: i2c build failure
@ 2008-05-15  2:12 Stephen Rothwell
  2008-05-15  8:22 ` Jean Delvare
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2008-05-15  2:12 UTC (permalink / raw)
  To: Jean Delvare; +Cc: linux-next, Olof Johansson

[-- Attachment #1: Type: text/plain, Size: 755 bytes --]

Hi Jean,

Today's linux-next build (powerpc ppc64_defconfig) fails like this:

arch/powerpc/platforms/pasemi/misc.c: In function 'find_i2c_driver':
arch/powerpc/platforms/pasemi/misc.c:43: error: 'struct i2c_board_info' has no member named 'driver_name'
arch/powerpc/platforms/pasemi/misc.c:44: error: 'struct i2c_board_info' has no member named 'driver_name'
arch/powerpc/platforms/pasemi/misc.c:44: error: 'struct i2c_board_info' has no member named 'driver_name'

So I reverted commit f625810ef235a8b238427df3129792f89187c085 ("i2c: Kill
the old driver matching scheme").  Obviously not the correct fix, but it
makes the build work.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread
* linux-next: i2c build failure
@ 2008-05-23  1:32 Stephen Rothwell
  2008-05-23  1:58 ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2008-05-23  1:32 UTC (permalink / raw)
  To: Jean Delvare, Greg KH; +Cc: linux-next, Dave Young, Kay Sievers

Hi Jean,

Today's linux-next build (powerpc ppc64_defconfig) failed like this:

drivers/i2c/i2c-core.c: In function 'i2c_register_driver':
drivers/i2c/i2c-core.c:697: warning: passing argument 2 of 'class_for_each_device' from incompatible pointer type
drivers/i2c/i2c-core.c:697: error: too few arguments to function 'class_for_each_device'
drivers/i2c/i2c-core.c: In function 'i2c_del_driver':
drivers/i2c/i2c-core.c:749: warning: passing argument 2 of 'class_for_each_device' from incompatible pointer type
drivers/i2c/i2c-core.c:749: error: too few arguments to function 'class_for_each_device'

This is caused by commit f79228aaa062668bcbabf9762e819a1d7ee7c5c4 ("i2c:
Use class_for_each_device") from the i2c tree interacting with commit
a3ec024649e0095368d38a2e434ad092b79aa7af ("Driver Core: add ability for
class_for_each_device to start in middle of list") from the driver-core
tree.  The latter added a parameter to class_for_each_device while the
former added a new usage.

I applied the patch below.

Greg, is there some better way to handle this interface change?  (e.g. new
function name?)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

>From 4dde1df49f5c1301b5eea93a3776624de6e4f0c5 Mon Sep 17 00:00:00 2001
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 23 May 2008 11:27:59 +1000
Subject: [PATCH] i2c: fix fallout from class_for_each_device change.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/i2c/i2c-core.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index e06067e..a1021d5 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -693,7 +693,7 @@ int i2c_register_driver(struct module *owner, struct i2c_driver *driver)
 
 	/* legacy drivers scan i2c busses directly */
 	if (driver->attach_adapter)
-		class_for_each_device(&i2c_adapter_class, driver,
+		class_for_each_device(&i2c_adapter_class, NULL, driver,
 				      __attach_adapter);
 
 	mutex_unlock(&core_lock);
@@ -745,7 +745,7 @@ void i2c_del_driver(struct i2c_driver *driver)
 
 	/* legacy driver? */
 	if (!is_newstyle_driver(driver))
-		class_for_each_device(&i2c_adapter_class, driver,
+		class_for_each_device(&i2c_adapter_class, NULL, driver,
 				      __detach_adapter);
 
 	driver_unregister(&driver->driver);
-- 
1.5.5.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-05-23  1:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-15  2:12 linux-next: i2c build failure Stephen Rothwell
2008-05-15  8:22 ` Jean Delvare
2008-05-15 10:39   ` Stephen Rothwell
2008-05-15 19:47   ` Olof Johansson
2008-05-23  1:32 Stephen Rothwell
2008-05-23  1:58 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).