i2c init section fixes
Subsystems (2)
PATCH 1/1 i2c init section fixes
Fix init section warnings in the new i2c init code. It's wrong to call "__init" functions from non-__init ones.
arch/arm/plat-omap/i2c.c +2 -2
@@ -80,7 +80,7 @@ #if defined(CONFIG_ARCH_OMAP34XX)#endif }; -static void omap_i2c_mux_pins (int bus_id) +static void __init omap_i2c_mux_pins (int bus_id) {/* TODO: Muxing for OMAP3 */ switch (bus_id) {
@@ -102,7 +102,7 @@ static void omap_i2c_mux_pins(int bus_id } } -int omap_register_i2c_bus (int bus_id,u32 clkrate, +int __init omap_register_i2c_bus (int bus_id,u32 clkrate,struct i2c_board_info const *info,unsigned len) {
arch/arm/plat-omap/i2c.c
Quoted 8 lines · On Fri, 23 Nov 2007 23:20:05 -0800 "ext David Brownell" <[email protected]>…
Fix init section warnings in the new i2c init code. It's wrong to call "
__init" functions from non-__init ones.Signed-off-by David Brownell <[email protected]>arch/arm/plat-omap/i2c.c +0
-0
Since i2c_register_board_info is defined with __init, we have to define functions here with __init as well.
---
How do I enable that warning since I don't see it now? I remember that I saw some timer related __init warnings some time ago. I'm using "gcc version 3.4.4 (release) (CodeSourcery ARM 2005q3-2)".
Jarkko
Quoted 14 lines · Jarkko Nikula
arch/arm/plat-omap/i2c.c
Quoted 8 lines · On Fri, 23 Nov 2007 23:20:05 -0800 "ext David Brownell" <[email protected]>…
Fix init section warnings in the new i2c init code. It's wrong to call "
__init" functions from non-__init ones.Signed-off-by David Brownell <[email protected]>arch/arm/plat-omap/i2c.c +0
-0Since
i2c_register_board_infois defined with__init, we have to define functions here with__initas well.
Quoted 7 lines
Acked-by Jarkko Nikula <[email protected]>---
How do I enable that warning since I don't see it now? I remember that I saw some timer related
__initwarnings some time ago. I'm using "gcc version 3.4.4 (release) (CodeSourcery ARM 2005q3-2)".
Pushing today.
Tony