Patchwork mtd: phram: fix section mismatch for phram_setup

login
register
mail settings
Submitter Ryosuke Saito
Date March 21, 2012, 9:47 a.m.
Message ID <1332323267.14283.13.camel@HDL00099>
Download mbox | patch
Permalink /patch/147954/
State Accepted
Commit b11ec57fc6e6d4882ef01a0c09a1dde58f50492e
Headers show

Comments

Ryosuke Saito - March 21, 2012, 9:47 a.m.
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.

Signed-off-by: Ryosuke Saito <raitosyo@gmail.com>
---
 drivers/mtd/devices/phram.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Artem Bityutskiy - March 21, 2012, 2:42 p.m.
On Wed, 2012-03-21 at 18:47 +0900, Ryosuke Saito wrote:
> 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.
> 
> Signed-off-by: Ryosuke Saito <raitosyo@gmail.com>

Pushed to l2-mtd.git, thanks!

Patch

diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c
index 3d91ace..67823de 100644
--- a/drivers/mtd/devices/phram.c
+++ b/drivers/mtd/devices/phram.c
@@ -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];