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

gpiolib: remove empty asm/gpio.h files

The arm and sh versions of this file are identical to the generic
versions and can just be removed.

The drivers that actually use the sh3 specific version also include
cpu/gpio.h directly, with the exception of magicpanelr2, which is
easily fixed. This leaves coldfire as the only gpio driver
that needs something custom for gpiolib.

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>

authored by

Arnd Bergmann and committed by
Andy Shevchenko
ee5a66d8 21d9526d

+1 -68
-1
arch/arm/Kconfig
··· 24 24 select ARCH_HAS_SYNC_DMA_FOR_CPU 25 25 select ARCH_HAS_TEARDOWN_DMA_OPS if MMU 26 26 select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST 27 - select ARCH_HAVE_CUSTOM_GPIO_H 28 27 select ARCH_HAVE_NMI_SAFE_CMPXCHG if CPU_V7 || CPU_V7M || CPU_V6K 29 28 select ARCH_HAS_GCOV_PROFILE_ALL 30 29 select ARCH_KEEP_MEMBLOCK
-21
arch/arm/include/asm/gpio.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef _ARCH_ARM_GPIO_H 3 - #define _ARCH_ARM_GPIO_H 4 - 5 - #include <asm-generic/gpio.h> 6 - 7 - /* The trivial gpiolib dispatchers */ 8 - #define gpio_get_value __gpio_get_value 9 - #define gpio_set_value __gpio_set_value 10 - #define gpio_cansleep __gpio_cansleep 11 - 12 - /* 13 - * Provide a default gpio_to_irq() which should satisfy every case. 14 - * However, some platforms want to do this differently, so allow them 15 - * to override it. 16 - */ 17 - #ifndef gpio_to_irq 18 - #define gpio_to_irq __gpio_to_irq 19 - #endif 20 - 21 - #endif /* _ARCH_ARM_GPIO_H */
-1
arch/sh/Kconfig
··· 4 4 select ARCH_32BIT_OFF_T 5 5 select ARCH_ENABLE_MEMORY_HOTPLUG if SPARSEMEM && MMU 6 6 select ARCH_ENABLE_MEMORY_HOTREMOVE if SPARSEMEM && MMU 7 - select ARCH_HAVE_CUSTOM_GPIO_H 8 7 select ARCH_HAVE_NMI_SAFE_CMPXCHG if (GUSA_RB || CPU_SH4A) 9 8 select ARCH_HAS_BINFMT_FLAT if !MMU 10 9 select ARCH_HAS_CURRENT_STACK_POINTER
+1
arch/sh/boards/board-magicpanelr2.c
··· 21 21 #include <linux/sh_intc.h> 22 22 #include <mach/magicpanelr2.h> 23 23 #include <asm/heartbeat.h> 24 + #include <cpu/gpio.h> 24 25 #include <cpu/sh7720.h> 25 26 26 27 /* Dummy supplies, where voltage doesn't matter */
-45
arch/sh/include/asm/gpio.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 2 - * 3 - * include/asm-sh/gpio.h 4 - * 5 - * Generic GPIO API and pinmux table support for SuperH. 6 - * 7 - * Copyright (c) 2008 Magnus Damm 8 - */ 9 - #ifndef __ASM_SH_GPIO_H 10 - #define __ASM_SH_GPIO_H 11 - 12 - #include <linux/kernel.h> 13 - #include <linux/errno.h> 14 - 15 - #if defined(CONFIG_CPU_SH3) 16 - #include <cpu/gpio.h> 17 - #endif 18 - 19 - #include <asm-generic/gpio.h> 20 - 21 - #ifdef CONFIG_GPIOLIB 22 - 23 - static inline int gpio_get_value(unsigned gpio) 24 - { 25 - return __gpio_get_value(gpio); 26 - } 27 - 28 - static inline void gpio_set_value(unsigned gpio, int value) 29 - { 30 - __gpio_set_value(gpio, value); 31 - } 32 - 33 - static inline int gpio_cansleep(unsigned gpio) 34 - { 35 - return __gpio_cansleep(gpio); 36 - } 37 - 38 - static inline int gpio_to_irq(unsigned gpio) 39 - { 40 - return __gpio_to_irq(gpio); 41 - } 42 - 43 - #endif /* CONFIG_GPIOLIB */ 44 - 45 - #endif /* __ASM_SH_GPIO_H */