Skip to contentSkip to conversation

mtd: phram: fix section mismatch for phram_setup

PATCH Applied Ryosuke Saito 2 participants 2 messages Mar 21, 2012

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

PATCH 1/1 mtd: phram: fix section mismatch for phram_setup

phram_setup() is only called from init_phram() which is in .init.text, so it must be in the same section to avoid a section mismatch warning.

---
 drivers/mtd/devices/phram.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/devices/phram.c +1 -1
index 3d91ace..67823de 100644
@@ -215,7 +215,7 @@ static inline void kill_final_newline(char *str)
  */
 static __initdata char phram_paramline[64+12+12];
 
-static int phram_setup(const char *val)
+static int __init phram_setup(const char *val)
 {
 	char buf[64+12+12], *str = buf;
 	char *token[3];
Signature · 1 line
1.7.3.4
#1 lore raw
Quoted 4 lines · Ryosuke Saito

phram_setup() is only called from init_phram() which is in .init.text, so it must be in the same section to avoid a section mismatch warning.

Pushed to l2-mtd.git, thanks!

Signature · 2 lines
Best Regards,
Artem Bityutskiy