From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Jean Delvare <khali@linux-fr.org>, Greg KH <greg@kroah.com>
Cc: linux-next@vger.kernel.org,
Dave Young <hidave.darkstar@gmail.com>,
Kay Sievers <kay.sievers@vrfy.org>
Subject: linux-next: i2c build failure
Date: Fri, 23 May 2008 11:32:55 +1000 [thread overview]
Message-ID: <20080523113255.258e38bd.sfr@canb.auug.org.au> (raw)
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
next reply other threads:[~2008-05-23 1:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-23 1:32 Stephen Rothwell [this message]
2008-05-23 1:58 ` linux-next: i2c build failure Greg KH
-- strict thread matches above, loose matches on Subject: below --
2008-05-15 2:12 Stephen Rothwell
2008-05-15 8:22 ` Jean Delvare
2008-05-15 10:39 ` Stephen Rothwell
2008-05-15 19:47 ` Olof Johansson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080523113255.258e38bd.sfr@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=greg@kroah.com \
--cc=hidave.darkstar@gmail.com \
--cc=kay.sievers@vrfy.org \
--cc=khali@linux-fr.org \
--cc=linux-next@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).