Skip to content

Commit

Permalink
gpio: omap: omap_gpio_show_rev is not __init
Browse files Browse the repository at this point in the history
The probe function calls omap_gpio_show_rev(), which on most
compilers is inlined, but on the old gcc-4.6 is not, causing
a valid warning about the incorrect __init annotation:

WARNING: vmlinux.o(.text+0x40f614): Section mismatch in reference from the function omap_gpio_probe() to the function .init.text:omap_gpio_show_rev()
The function omap_gpio_probe() references
the function __init omap_gpio_show_rev().
This is often because omap_gpio_probe lacks a __init
annotation or the annotation of omap_gpio_show_rev is wrong.

This removes the __init.

Signed-off-by: Arnd Bergmann <[email protected]>
Acked-by: Santosh Shilimkar <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
  • Loading branch information
arndb authored and linusw committed Sep 21, 2017
1 parent e40a3ae commit e4b2ae7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ static void omap_gpio_set(struct gpio_chip *chip, unsigned offset, int value)

/*---------------------------------------------------------------------*/

static void __init omap_gpio_show_rev(struct gpio_bank *bank)
static void omap_gpio_show_rev(struct gpio_bank *bank)
{
static bool called;
u32 rev;
Expand Down

0 comments on commit e4b2ae7

Please sign in to comment.