Skip to content

Commit

Permalink
apbuart: fix section mismatch warning
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sam Ravnborg authored and David S. Miller committed Dec 27, 2011
1 parent e1a8b69 commit ab17da5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/tty/serial/apbuart.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ static int __devinit apbuart_probe(struct platform_device *op)
return 0;
}

static struct of_device_id __initdata apbuart_match[] = {
static struct of_device_id apbuart_match[] = {
{
.name = "GAISLER_APBUART",
},
Expand All @@ -597,7 +597,7 @@ static struct platform_driver grlib_apbuart_of_driver = {
};


static int grlib_apbuart_configure(void)
static int __init grlib_apbuart_configure(void)
{
struct device_node *np;
int line = 0;
Expand Down

0 comments on commit ab17da5

Please sign in to comment.