mfd: Fix section mismatch warning for da9052
Subsystems (2)
PATCH 1/1 mfd: Fix section mismatch warning for da9052
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.
--- 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(-)
drivers/mfd/da9052-core.c +2 -2
@@ -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;
drivers/mfd/da9052-i2c.c +2 -2
@@ -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" ,
drivers/mfd/da9052-spi.c +2 -2
@@ -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);
Signature · 1 line
1.7.5.4
Quoted 3 lines · Axel Lin
This patch changes
da9052_subdev_infoto__devinitdataand marks__devinitfor probe functions to fix below build warning.
For completeness, also marks__devexitfor remove functions.
That should be fixed already in -next.