From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mfd:fix section mismatch in ab3550-core
Date: Wed, 3 Aug 2011 10:32:55 +0200 [thread overview]
Message-ID: <20110803083255.GJ9250@pengutronix.de> (raw)
In-Reply-To: <1312358550-21862-1-git-send-email-gaowanlong@cn.fujitsu.com>
On Wed, Aug 03, 2011 at 04:02:30PM +0800, Wanlong Gao wrote:
> Move the __init to __devinit for section mismatch fixing.
>
> Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Adding the mismatch warning that is fixed by the patch would be nice.
> ---
> drivers/mfd/ab3550-core.c | 10 +++++-----
> 1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/mfd/ab3550-core.c b/drivers/mfd/ab3550-core.c
> index 56ba194..703401c 100644
> --- a/drivers/mfd/ab3550-core.c
> +++ b/drivers/mfd/ab3550-core.c
> @@ -1086,7 +1086,7 @@ static inline void ab3550_remove_debugfs(void)
> * This sets up a default config in the AB3550 chip so that it
> * will work as expected.
> */
> -static int __init ab3550_setup(struct ab3550 *ab)
> +static int __devinit ab3550_setup(struct ab3550 *ab)
> {
> int err = 0;
> int i;
> @@ -1193,7 +1193,7 @@ struct ab_family_id {
> char *name;
> };
>
> -static const struct ab_family_id ids[] __initdata = {
> +static const struct ab_family_id ids[] __devinitdata = {
This is wrong. const data must use __devinitconst. (And __initdata was
also wrong, should have been __initconst.)
Other than that the patch looks OK.
Uwe
> /* AB3550 */
> {
> .id = AB3550_P1A,
> @@ -1205,7 +1205,7 @@ static const struct ab_family_id ids[] __initdata = {
> }
> };
>
> -static int __init ab3550_probe(struct i2c_client *client,
> +static int __devinit ab3550_probe(struct i2c_client *client,
> const struct i2c_device_id *id)
> {
> struct ab3550 *ab;
> @@ -1326,7 +1326,7 @@ exit_no_detect:
> return err;
> }
>
> -static int __exit ab3550_remove(struct i2c_client *client)
> +static int __devexit ab3550_remove(struct i2c_client *client)
> {
> struct ab3550 *ab = i2c_get_clientdata(client);
> int num_i2c_clients = AB3550_NUM_BANKS;
> @@ -1359,7 +1359,7 @@ static struct i2c_driver ab3550_driver = {
> },
> .id_table = ab3550_id,
> .probe = ab3550_probe,
> - .remove = __exit_p(ab3550_remove),
> + .remove = __devexit_p(ab3550_remove),
> };
>
> static int __init ab3550_i2c_init(void)
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
next prev parent reply other threads:[~2011-08-03 8:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-03 8:02 [PATCH] mfd:fix section mismatch in ab3550-core Wanlong Gao
2011-08-03 8:32 ` Uwe Kleine-König [this message]
2011-08-03 8:57 ` [PATCH v2] mfd:fix section mismatch warning " Wanlong Gao
2011-08-03 10:19 ` Linus Walleij
2011-08-03 11:43 ` Uwe Kleine-König
2011-08-04 4:32 ` [PATCH v3] " Wanlong Gao
2011-08-21 23:09 ` Samuel Ortiz
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=20110803083255.GJ9250@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.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).