diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2011-12-27 16:07:23 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-27 16:33:13 -0500 |
commit | ab17da5cb9d4aaf9f04c706761d3a8024897bedd (patch) | |
tree | d4c8ef81b261d8b4ebd9d94090c25ed1fde496f0 /drivers | |
parent | e1a8b69afd63f26f8e7be39e3bc78c4894cdb9fd (diff) |
apbuart: fix section mismatch warning
Fix following warnings:
WARNING: drivers/tty/serial/built-in.o(.text+0x7370): Section mismatch in reference from the function grlib_apbuart_configure() to the variable .init.data:apbuart_match
The function grlib_apbuart_configure() references
the variable __initdata apbuart_match.
This is often because grlib_apbuart_configure lacks a __initdata
annotation or the annotation of apbuart_match is wrong.
+ 3 more warnings like this.
There is no guarantee that grlib_apbuart_of_driver.of_match_table
is only used at __init time - so drop the __initdata annotation.
grlib_apbuart_configure() is only used during __init so add __init
to this method too.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Daniel Hellstrom <daniel@gaisler.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/tty/serial/apbuart.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serial/apbuart.c b/drivers/tty/serial/apbuart.c index 77554fd68d1f..7162f70d9260 100644 --- a/drivers/tty/serial/apbuart.c +++ b/drivers/tty/serial/apbuart.c | |||
@@ -577,7 +577,7 @@ static int __devinit apbuart_probe(struct platform_device *op) | |||
577 | return 0; | 577 | return 0; |
578 | } | 578 | } |
579 | 579 | ||
580 | static struct of_device_id __initdata apbuart_match[] = { | 580 | static struct of_device_id apbuart_match[] = { |
581 | { | 581 | { |
582 | .name = "GAISLER_APBUART", | 582 | .name = "GAISLER_APBUART", |
583 | }, | 583 | }, |
@@ -597,7 +597,7 @@ static struct platform_driver grlib_apbuart_of_driver = { | |||
597 | }; | 597 | }; |
598 | 598 | ||
599 | 599 | ||
600 | static int grlib_apbuart_configure(void) | 600 | static int __init grlib_apbuart_configure(void) |
601 | { | 601 | { |
602 | struct device_node *np; | 602 | struct device_node *np; |
603 | int line = 0; | 603 | int line = 0; |