Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: at91: pm: Move prototypes to mutually included header

Both the caller and the supplier's source file should have access to
the include file containing the prototypes.

Fixes the following W=1 kernel build warning(s):

drivers/pinctrl/pinctrl-at91.c:1637:6: warning: no previous prototype for ‘at91_pinctrl_gpio_suspend’ [-Wmissing-prototypes]
1637 | void at91_pinctrl_gpio_suspend(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pinctrl/pinctrl-at91.c:1661:6: warning: no previous prototype for ‘at91_pinctrl_gpio_resume’ [-Wmissing-prototypes]
1661 | void at91_pinctrl_gpio_resume(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~

Cc: Russell King <linux@armlinux.org.uk>
Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210303124149.3149511-1-lee.jones@linaro.org

authored by

Lee Jones and committed by
Alexandre Belloni
41dbf4a1 a38fd874

+26 -11
+8 -11
arch/arm/mach-at91/pm.c
··· 17 17 #include <linux/clk/at91_pmc.h> 18 18 #include <linux/platform_data/atmel.h> 19 19 20 + #include <soc/at91/pm.h> 21 + 20 22 #include <asm/cacheflush.h> 21 23 #include <asm/fncpy.h> 22 24 #include <asm/system_misc.h> ··· 26 24 27 25 #include "generic.h" 28 26 #include "pm.h" 29 - 30 - /* 31 - * FIXME: this is needed to communicate between the pinctrl driver and 32 - * the PM implementation in the machine. Possibly part of the PM 33 - * implementation should be moved down into the pinctrl driver and get 34 - * called as part of the generic suspend/resume path. 35 - */ 36 - #ifdef CONFIG_PINCTRL_AT91 37 - extern void at91_pinctrl_gpio_suspend(void); 38 - extern void at91_pinctrl_gpio_resume(void); 39 - #endif 40 27 41 28 struct at91_soc_pm { 42 29 int (*config_shdwc_ws)(void __iomem *shdwc, u32 *mode, u32 *polarity); ··· 317 326 static int at91_pm_enter(suspend_state_t state) 318 327 { 319 328 #ifdef CONFIG_PINCTRL_AT91 329 + /* 330 + * FIXME: this is needed to communicate between the pinctrl driver and 331 + * the PM implementation in the machine. Possibly part of the PM 332 + * implementation should be moved down into the pinctrl driver and get 333 + * called as part of the generic suspend/resume path. 334 + */ 320 335 at91_pinctrl_gpio_suspend(); 321 336 #endif 322 337
+2
drivers/pinctrl/pinctrl-at91.c
··· 23 23 /* Since we request GPIOs from ourself */ 24 24 #include <linux/pinctrl/consumer.h> 25 25 26 + #include <soc/at91/pm.h> 27 + 26 28 #include "pinctrl-at91.h" 27 29 #include "core.h" 28 30
+16
include/soc/at91/pm.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0-only */ 2 + /* 3 + * Atmel Power Management 4 + * 5 + * Copyright (C) 2020 Atmel 6 + * 7 + * Author: Lee Jones <lee.jones@linaro.org> 8 + */ 9 + 10 + #ifndef __SOC_ATMEL_PM_H 11 + #define __SOC_ATMEL_PM_H 12 + 13 + void at91_pinctrl_gpio_suspend(void); 14 + void at91_pinctrl_gpio_resume(void); 15 + 16 + #endif /* __SOC_ATMEL_PM_H */