From: Axel Lin <axel.lin@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: David Dajun Chen <dchen@diasemi.com>,
Ashish Jangam <ashish.jangam@kpitcummins.com>,
Samuel Ortiz <sameo@linux.intel.com>,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: [PATCH] mfd: Fix section mismatch warning for da9052
Date: Thu, 29 Dec 2011 17:17:48 +0800 [thread overview]
Message-ID: <1325150268.13424.1.camel@phoenix> (raw)
This patch changes da9052_subdev_info to __devinitdata and marks __devinit
for probe functions to fix below build warning.
For completeness, also marks __devexit for remove functions.
LD drivers/mfd/built-in.o
WARNING: drivers/mfd/built-in.o(.text+0x104fc): Section mismatch in reference from the function da9052_device_init() to the (unknown reference) .init.data:(unknown)
The function da9052_device_init() references
the (unknown reference) __initdata (unknown).
This is often because da9052_device_init lacks a __initdata
annotation or the annotation of (unknown) is wrong.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/mfd/da9052-core.c | 4 ++--
drivers/mfd/da9052-i2c.c | 4 ++--
drivers/mfd/da9052-spi.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/mfd/da9052-core.c b/drivers/mfd/da9052-core.c
index a7c115c..2a5e271 100644
--- a/drivers/mfd/da9052-core.c
+++ b/drivers/mfd/da9052-core.c
@@ -383,7 +383,7 @@ static struct resource da9052_tsi_resources[] = {
},
};
-static struct mfd_cell __initdata da9052_subdev_info[] = {
+static struct mfd_cell __devinitdata da9052_subdev_info[] = {
{
.name = "da9052-regulator",
.id = 1,
@@ -637,7 +637,7 @@ struct regmap_config da9052_regmap_config = {
};
EXPORT_SYMBOL_GPL(da9052_regmap_config);
-int da9052_device_init(struct da9052 *da9052, u8 chip_id)
+int __devinit da9052_device_init(struct da9052 *da9052, u8 chip_id)
{
struct da9052_pdata *pdata = da9052->dev->platform_data;
struct irq_desc *desc;
diff --git a/drivers/mfd/da9052-i2c.c b/drivers/mfd/da9052-i2c.c
index 44b97c7..f99685a 100644
--- a/drivers/mfd/da9052-i2c.c
+++ b/drivers/mfd/da9052-i2c.c
@@ -87,7 +87,7 @@ err:
return ret;
}
-static int da9052_i2c_remove(struct i2c_client *client)
+static int __devexit da9052_i2c_remove(struct i2c_client *client)
{
struct da9052 *da9052 = i2c_get_clientdata(client);
@@ -107,7 +107,7 @@ static struct i2c_device_id da9052_i2c_id[] = {
static struct i2c_driver da9052_i2c_driver = {
.probe = da9052_i2c_probe,
- .remove = da9052_i2c_remove,
+ .remove = __devexit_p(da9052_i2c_remove),
.id_table = da9052_i2c_id,
.driver = {
.name = "da9052",
diff --git a/drivers/mfd/da9052-spi.c b/drivers/mfd/da9052-spi.c
index cdbc7ca..2693c87 100644
--- a/drivers/mfd/da9052-spi.c
+++ b/drivers/mfd/da9052-spi.c
@@ -21,7 +21,7 @@
#include <linux/mfd/da9052/da9052.h>
-static int da9052_spi_probe(struct spi_device *spi)
+static int __devinit da9052_spi_probe(struct spi_device *spi)
{
int ret;
const struct spi_device_id *id = spi_get_device_id(spi);
@@ -61,7 +61,7 @@ err:
return ret;
}
-static int da9052_spi_remove(struct spi_device *spi)
+static int __devexit da9052_spi_remove(struct spi_device *spi)
{
struct da9052 *da9052 = dev_get_drvdata(&spi->dev);
--
1.7.5.4
next reply other threads:[~2011-12-29 9:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-29 9:17 Axel Lin [this message]
2011-12-29 10:35 ` [PATCH] mfd: Fix section mismatch warning for da9052 Mark Brown
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=1325150268.13424.1.camel@phoenix \
--to=axel.lin@gmail.com \
--cc=ashish.jangam@kpitcummins.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=dchen@diasemi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sameo@linux.intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.