diff options
author | Arnd Bergmann <arnd@arndb.de> | 2013-01-25 09:14:29 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-01-29 17:10:11 -0500 |
commit | 312b00e510af60175b2935404a1927e6480e91e7 (patch) | |
tree | d9a6b6b4fa29f9d5982b25e99fcd1fabb47e4e0c /drivers/pinctrl/pinctrl-exynos5440.c | |
parent | 8b77b3762c37c9c2ce72f0d075890a3e8849702f (diff) |
pinctrl: exynos: don't mark probing functions as __init
Functions called from a driver probe() method must not be
marked __init, because they may get called after the
init phase is done, when the device shows up late, or
because of deferred probing.
Without this patch, building exynos_defconfig results in
multiple warnings like:
WARNING: drivers/pinctrl/built-in.o(.text+0x51bc): Section mismatch in reference from the function exynos5440_pinctrl_probe() to the function .init.text:exynos5440_gpiolib_register()
The function exynos5440_pinctrl_probe() references
the function __init exynos5440_gpiolib_register().
This is often because exynos5440_pinctrl_probe lacks a __init
annotation or the annotation of exynos5440_gpiolib_register is wrong.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Tomasz Figa <t.figa@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-exynos5440.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-exynos5440.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/pinctrl/pinctrl-exynos5440.c b/drivers/pinctrl/pinctrl-exynos5440.c index de05b64f0da6..142729914c34 100644 --- a/drivers/pinctrl/pinctrl-exynos5440.c +++ b/drivers/pinctrl/pinctrl-exynos5440.c | |||
@@ -599,7 +599,7 @@ static int exynos5440_gpio_direction_output(struct gpio_chip *gc, unsigned offse | |||
599 | } | 599 | } |
600 | 600 | ||
601 | /* parse the pin numbers listed in the 'samsung,exynos5440-pins' property */ | 601 | /* parse the pin numbers listed in the 'samsung,exynos5440-pins' property */ |
602 | static int __init exynos5440_pinctrl_parse_dt_pins(struct platform_device *pdev, | 602 | static int exynos5440_pinctrl_parse_dt_pins(struct platform_device *pdev, |
603 | struct device_node *cfg_np, unsigned int **pin_list, | 603 | struct device_node *cfg_np, unsigned int **pin_list, |
604 | unsigned int *npins) | 604 | unsigned int *npins) |
605 | { | 605 | { |
@@ -630,7 +630,7 @@ static int __init exynos5440_pinctrl_parse_dt_pins(struct platform_device *pdev, | |||
630 | * Parse the information about all the available pin groups and pin functions | 630 | * Parse the information about all the available pin groups and pin functions |
631 | * from device node of the pin-controller. | 631 | * from device node of the pin-controller. |
632 | */ | 632 | */ |
633 | static int __init exynos5440_pinctrl_parse_dt(struct platform_device *pdev, | 633 | static int exynos5440_pinctrl_parse_dt(struct platform_device *pdev, |
634 | struct exynos5440_pinctrl_priv_data *priv) | 634 | struct exynos5440_pinctrl_priv_data *priv) |
635 | { | 635 | { |
636 | struct device *dev = &pdev->dev; | 636 | struct device *dev = &pdev->dev; |
@@ -723,7 +723,7 @@ static int __init exynos5440_pinctrl_parse_dt(struct platform_device *pdev, | |||
723 | } | 723 | } |
724 | 724 | ||
725 | /* register the pinctrl interface with the pinctrl subsystem */ | 725 | /* register the pinctrl interface with the pinctrl subsystem */ |
726 | static int __init exynos5440_pinctrl_register(struct platform_device *pdev, | 726 | static int exynos5440_pinctrl_register(struct platform_device *pdev, |
727 | struct exynos5440_pinctrl_priv_data *priv) | 727 | struct exynos5440_pinctrl_priv_data *priv) |
728 | { | 728 | { |
729 | struct device *dev = &pdev->dev; | 729 | struct device *dev = &pdev->dev; |
@@ -798,7 +798,7 @@ static int __init exynos5440_pinctrl_register(struct platform_device *pdev, | |||
798 | } | 798 | } |
799 | 799 | ||
800 | /* register the gpiolib interface with the gpiolib subsystem */ | 800 | /* register the gpiolib interface with the gpiolib subsystem */ |
801 | static int __init exynos5440_gpiolib_register(struct platform_device *pdev, | 801 | static int exynos5440_gpiolib_register(struct platform_device *pdev, |
802 | struct exynos5440_pinctrl_priv_data *priv) | 802 | struct exynos5440_pinctrl_priv_data *priv) |
803 | { | 803 | { |
804 | struct gpio_chip *gc; | 804 | struct gpio_chip *gc; |
@@ -831,7 +831,7 @@ static int __init exynos5440_gpiolib_register(struct platform_device *pdev, | |||
831 | } | 831 | } |
832 | 832 | ||
833 | /* unregister the gpiolib interface with the gpiolib subsystem */ | 833 | /* unregister the gpiolib interface with the gpiolib subsystem */ |
834 | static int __init exynos5440_gpiolib_unregister(struct platform_device *pdev, | 834 | static int exynos5440_gpiolib_unregister(struct platform_device *pdev, |
835 | struct exynos5440_pinctrl_priv_data *priv) | 835 | struct exynos5440_pinctrl_priv_data *priv) |
836 | { | 836 | { |
837 | int ret = gpiochip_remove(priv->gc); | 837 | int ret = gpiochip_remove(priv->gc); |