aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-09-28 17:36:16 -0400
committerLinus Walleij <linus.walleij@linaro.org>2012-10-15 03:09:27 -0400
commit47dbec59c37ab02946a6db7ac30c3bf6ca02630c (patch)
tree39230909f26718fc964496390dc694e98c9af284 /drivers/pinctrl
parentddffeb8c4d0331609ef2581d84de4d763607bd37 (diff)
pinctrl: samsung: use __devinit section for init code
The samsung pinctrl driver has a probe function that is __devinit and that calls a lot of other functions that are marked __init, which kbuild complains about. Marking everything __devinit means that the code does not discarded when CONFIG_HOTPLUG is set, which is a little more wasteful, but also more consistent Without this patch, building exynos_defconfig results in: WARNING: drivers/pinctrl/built-in.o(.devinit.text+0x124): Section mismatch in reference from the function samsung_pinctrl_probe() to the function .init.text:samsung_gpiolib_register() The function __devinit samsung_pinctrl_probe() references a function __init samsung_gpiolib_register(). If samsung_gpiolib_register is only used by samsung_pinctrl_probe then annotate samsung_gpiolib_register with a matching annotation. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Thomas Abraham <thomas.abraham@linaro.org> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Stephen Warren <swarren@nvidia.com> Cc: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/pinctrl-samsung.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/pinctrl/pinctrl-samsung.c b/drivers/pinctrl/pinctrl-samsung.c
index dd108a94acf..861cd5f04d5 100644
--- a/drivers/pinctrl/pinctrl-samsung.c
+++ b/drivers/pinctrl/pinctrl-samsung.c
@@ -513,7 +513,7 @@ static int samsung_gpio_direction_output(struct gpio_chip *gc, unsigned offset,
513 * Parse the pin names listed in the 'samsung,pins' property and convert it 513 * Parse the pin names listed in the 'samsung,pins' property and convert it
514 * into a list of gpio numbers are create a pin group from it. 514 * into a list of gpio numbers are create a pin group from it.
515 */ 515 */
516static int __init samsung_pinctrl_parse_dt_pins(struct platform_device *pdev, 516static int __devinit samsung_pinctrl_parse_dt_pins(struct platform_device *pdev,
517 struct device_node *cfg_np, struct pinctrl_desc *pctl, 517 struct device_node *cfg_np, struct pinctrl_desc *pctl,
518 unsigned int **pin_list, unsigned int *npins) 518 unsigned int **pin_list, unsigned int *npins)
519{ 519{
@@ -560,7 +560,7 @@ static int __init samsung_pinctrl_parse_dt_pins(struct platform_device *pdev,
560 * from device node of the pin-controller. A pin group is formed with all 560 * from device node of the pin-controller. A pin group is formed with all
561 * the pins listed in the "samsung,pins" property. 561 * the pins listed in the "samsung,pins" property.
562 */ 562 */
563static int __init samsung_pinctrl_parse_dt(struct platform_device *pdev, 563static int __devinit samsung_pinctrl_parse_dt(struct platform_device *pdev,
564 struct samsung_pinctrl_drv_data *drvdata) 564 struct samsung_pinctrl_drv_data *drvdata)
565{ 565{
566 struct device *dev = &pdev->dev; 566 struct device *dev = &pdev->dev;
@@ -655,7 +655,7 @@ static int __init samsung_pinctrl_parse_dt(struct platform_device *pdev,
655} 655}
656 656
657/* register the pinctrl interface with the pinctrl subsystem */ 657/* register the pinctrl interface with the pinctrl subsystem */
658static int __init samsung_pinctrl_register(struct platform_device *pdev, 658static int __devinit samsung_pinctrl_register(struct platform_device *pdev,
659 struct samsung_pinctrl_drv_data *drvdata) 659 struct samsung_pinctrl_drv_data *drvdata)
660{ 660{
661 struct pinctrl_desc *ctrldesc = &drvdata->pctl; 661 struct pinctrl_desc *ctrldesc = &drvdata->pctl;
@@ -729,7 +729,7 @@ static int __init samsung_pinctrl_register(struct platform_device *pdev,
729} 729}
730 730
731/* register the gpiolib interface with the gpiolib subsystem */ 731/* register the gpiolib interface with the gpiolib subsystem */
732static int __init samsung_gpiolib_register(struct platform_device *pdev, 732static int __devinit samsung_gpiolib_register(struct platform_device *pdev,
733 struct samsung_pinctrl_drv_data *drvdata) 733 struct samsung_pinctrl_drv_data *drvdata)
734{ 734{
735 struct gpio_chip *gc; 735 struct gpio_chip *gc;
@@ -762,7 +762,7 @@ static int __init samsung_gpiolib_register(struct platform_device *pdev,
762} 762}
763 763
764/* unregister the gpiolib interface with the gpiolib subsystem */ 764/* unregister the gpiolib interface with the gpiolib subsystem */
765static int __init samsung_gpiolib_unregister(struct platform_device *pdev, 765static int __devinit samsung_gpiolib_unregister(struct platform_device *pdev,
766 struct samsung_pinctrl_drv_data *drvdata) 766 struct samsung_pinctrl_drv_data *drvdata)
767{ 767{
768 int ret = gpiochip_remove(drvdata->gc); 768 int ret = gpiochip_remove(drvdata->gc);