提交 a0bb10e8 编写于 作者: R Russell King

ARM: omap: fix section mismatch errors in TWL PMIC driver

WARNING: drivers/mfd/built-in.o(.devinit.text+0x258): Section mismatch in reference from the function twl_probe() to the function .init.text:twl4030_power_init()
The function __devinit twl_probe() references
a function __init twl4030_power_init().
If twl4030_power_init is only used by twl_probe then
annotate twl4030_power_init with a matching annotation.

twl4030_power_init() references other __init marked functions, so
these too must become __devinit.
Acked-by: NTony Lindgren <tony@atomide.com>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 0bf68f53
...@@ -124,7 +124,7 @@ static u8 res_config_addrs[] = { ...@@ -124,7 +124,7 @@ static u8 res_config_addrs[] = {
[RES_MAIN_REF] = 0x94, [RES_MAIN_REF] = 0x94,
}; };
static int __init twl4030_write_script_byte(u8 address, u8 byte) static int __devinit twl4030_write_script_byte(u8 address, u8 byte)
{ {
int err; int err;
...@@ -138,7 +138,7 @@ static int __init twl4030_write_script_byte(u8 address, u8 byte) ...@@ -138,7 +138,7 @@ static int __init twl4030_write_script_byte(u8 address, u8 byte)
return err; return err;
} }
static int __init twl4030_write_script_ins(u8 address, u16 pmb_message, static int __devinit twl4030_write_script_ins(u8 address, u16 pmb_message,
u8 delay, u8 next) u8 delay, u8 next)
{ {
int err; int err;
...@@ -158,7 +158,7 @@ static int __init twl4030_write_script_ins(u8 address, u16 pmb_message, ...@@ -158,7 +158,7 @@ static int __init twl4030_write_script_ins(u8 address, u16 pmb_message,
return err; return err;
} }
static int __init twl4030_write_script(u8 address, struct twl4030_ins *script, static int __devinit twl4030_write_script(u8 address, struct twl4030_ins *script,
int len) int len)
{ {
int err; int err;
...@@ -183,7 +183,7 @@ static int __init twl4030_write_script(u8 address, struct twl4030_ins *script, ...@@ -183,7 +183,7 @@ static int __init twl4030_write_script(u8 address, struct twl4030_ins *script,
return err; return err;
} }
static int __init twl4030_config_wakeup3_sequence(u8 address) static int __devinit twl4030_config_wakeup3_sequence(u8 address)
{ {
int err; int err;
u8 data; u8 data;
...@@ -208,7 +208,7 @@ static int __init twl4030_config_wakeup3_sequence(u8 address) ...@@ -208,7 +208,7 @@ static int __init twl4030_config_wakeup3_sequence(u8 address)
return err; return err;
} }
static int __init twl4030_config_wakeup12_sequence(u8 address) static int __devinit twl4030_config_wakeup12_sequence(u8 address)
{ {
int err = 0; int err = 0;
u8 data; u8 data;
...@@ -262,7 +262,7 @@ static int __init twl4030_config_wakeup12_sequence(u8 address) ...@@ -262,7 +262,7 @@ static int __init twl4030_config_wakeup12_sequence(u8 address)
return err; return err;
} }
static int __init twl4030_config_sleep_sequence(u8 address) static int __devinit twl4030_config_sleep_sequence(u8 address)
{ {
int err; int err;
...@@ -276,7 +276,7 @@ static int __init twl4030_config_sleep_sequence(u8 address) ...@@ -276,7 +276,7 @@ static int __init twl4030_config_sleep_sequence(u8 address)
return err; return err;
} }
static int __init twl4030_config_warmreset_sequence(u8 address) static int __devinit twl4030_config_warmreset_sequence(u8 address)
{ {
int err; int err;
u8 rd_data; u8 rd_data;
...@@ -324,7 +324,7 @@ static int __init twl4030_config_warmreset_sequence(u8 address) ...@@ -324,7 +324,7 @@ static int __init twl4030_config_warmreset_sequence(u8 address)
return err; return err;
} }
static int __init twl4030_configure_resource(struct twl4030_resconfig *rconfig) static int __devinit twl4030_configure_resource(struct twl4030_resconfig *rconfig)
{ {
int rconfig_addr; int rconfig_addr;
int err; int err;
...@@ -416,7 +416,7 @@ static int __init twl4030_configure_resource(struct twl4030_resconfig *rconfig) ...@@ -416,7 +416,7 @@ static int __init twl4030_configure_resource(struct twl4030_resconfig *rconfig)
return 0; return 0;
} }
static int __init load_twl4030_script(struct twl4030_script *tscript, static int __devinit load_twl4030_script(struct twl4030_script *tscript,
u8 address) u8 address)
{ {
int err; int err;
...@@ -527,7 +527,7 @@ void twl4030_power_off(void) ...@@ -527,7 +527,7 @@ void twl4030_power_off(void)
pr_err("TWL4030 Unable to power off\n"); pr_err("TWL4030 Unable to power off\n");
} }
void __init twl4030_power_init(struct twl4030_power_data *twl4030_scripts) void __devinit twl4030_power_init(struct twl4030_power_data *twl4030_scripts)
{ {
int err = 0; int err = 0;
int i; int i;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册