]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
pinctrl: stm32: Declare stm32_pmx_get_mode() as static
authorAntonio Borneo <antonio.borneo@foss.st.com>
Tue, 10 Jun 2025 14:30:38 +0000 (16:30 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 18 Jun 2025 09:20:10 +0000 (11:20 +0200)
The commit acaa037970f6 ("pinctrl: stm32: Implement .get_direction
gpio_chip callback") exported the function stm32_pmx_get_mode()
and the struct stm32_gpio_bank, but these were never used outside
the file that defines them.

Declare the function as static, drop it from the include file and
drop also the struct, not anymore visible outside the file.

Signed-off-by: Antonio Borneo <antonio.borneo@foss.st.com>
Link: https://lore.kernel.org/20250610143042.295376-2-antonio.borneo@foss.st.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/stm32/pinctrl-stm32.c
drivers/pinctrl/stm32/pinctrl-stm32.h

index ba49d48c3a1d1e4ca660ca0a7625b03cb4c4b2e9..3abf47e31c019b15f213af4df2971362b5b35006 100644 (file)
@@ -122,6 +122,8 @@ struct stm32_pinctrl {
        spinlock_t irqmux_lock;
 };
 
+static void stm32_pmx_get_mode(struct stm32_gpio_bank *bank, int pin, u32 *mode, u32 *alt);
+
 static inline int stm32_gpio_pin(int gpio)
 {
        return gpio % STM32_GPIO_PINS_PER_BANK;
@@ -798,8 +800,7 @@ unlock:
        return err;
 }
 
-void stm32_pmx_get_mode(struct stm32_gpio_bank *bank, int pin, u32 *mode,
-                       u32 *alt)
+static void stm32_pmx_get_mode(struct stm32_gpio_bank *bank, int pin, u32 *mode, u32 *alt)
 {
        u32 val;
        int alt_shift = (pin % 8) * 4;
index 5e5de92ddd58cb0e0e31a9eef4c5d9a7c72c1d16..8790fef2d58a2e4cc5bf6e34a4d539be6ab699e9 100644 (file)
@@ -65,11 +65,7 @@ struct stm32_pinctrl_match_data {
        bool secure_control;
 };
 
-struct stm32_gpio_bank;
-
 int stm32_pctl_probe(struct platform_device *pdev);
-void stm32_pmx_get_mode(struct stm32_gpio_bank *bank,
-                       int pin, u32 *mode, u32 *alt);
 int stm32_pinctrl_suspend(struct device *dev);
 int stm32_pinctrl_resume(struct device *dev);