Skip to contentSkip to conversation

i2c init section fixes

PATCH In review David Brownell 3 participants 3 messages Nov 24, 2007 – Nov 28, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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)
 {
Acked-by on v1 1/1
#1 lore raw

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.

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

#2 lore raw
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.

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.

Quoted 7 lines

---

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)".

Pushing today.

Tony