treewide: replace linux/gpio.h
Subsystems (39)
cover treewide: replace linux/gpio.h
From: Arnd Bergmann <[email protected]>
The linux/gpio.h header used to be the global definition for the gpio interfaces, with 1100 users back in linux-3.17. In linux-7.2, only about 130 of those remain, so this series cleans out the rest.
In each subsystem, we can replace the header either with linux/gpio/consumer.h for users of the modern gpio descriptor interface, or linux/gpio/legacy.h for the few remaining users of the old number based interface.
All patches in this series can get applied independently, so my preference would be for each subsystem maintainer to apply these directly, with the rest going into the gpio tree at some point.
The final patch here obviously needs to wait for all the others to get merged first.
Arnd
Arnd Bergmann (13):
ARM: replace linux/gpio.h inclusions m68k/coldfire: replace linux/gpio.h inclusions
mips: replace linux/gpio.h inclusions
sh: replace linux/gpio.h inclusions
mfd: replace linux/gpio.h inclusions [net-next] net: replace linux/gpio.h inclusions
ASoC: replace linux/gpio.h inclusions
pcmcia: replace linux/gpio.h inclusions
phy: replace linux/gpio.h inclusions
media: replace linux/gpio.h inclusions
Input: matrix_keyboard - replace linux/gpio.h inclusion
gpib: gpio: replace linux/gpio.h inclusion
gpiolib: remove linux/gpio.h
MAINTAINERS | 1 - arch/arm/mach-davinci/da850.c | 2 +- arch/arm/mach-dove/mpp.c | 2 +- arch/arm/mach-mv78xx0/buffalo-wxl-setup.c | 2 +- arch/arm/mach-mv78xx0/irq.c | 2 +- arch/arm/mach-mv78xx0/mpp.c | 2 +- arch/arm/mach-mvebu/pm.c | 2 +- arch/arm/mach-mxs/mach-mxs.c | 2 +- arch/arm/mach-orion5x/board-d2net.c | 2 +- arch/arm/mach-orion5x/board-rd88f5182.c | 2 +- arch/arm/mach-orion5x/dns323-setup.c | 2 +- arch/arm/mach-orion5x/irq.c | 2 +- arch/arm/mach-orion5x/kurobox_pro-setup.c | 2 +- arch/arm/mach-orion5x/mv2120-setup.c | 2 +- arch/arm/mach-orion5x/net2big-setup.c | 2 +- .../arm/mach-orion5x/terastation_pro2-setup.c | 2 +- arch/arm/mach-orion5x/ts209-setup.c | 2 +- arch/arm/mach-orion5x/ts409-setup.c | 2 +- arch/arm/mach-pxa/am200epd.c | 2 +- arch/arm/mach-pxa/am300epd.c | 2 +- arch/arm/mach-pxa/generic.c | 2 +- arch/arm/mach-pxa/gumstix.c | 2 +- arch/arm/mach-pxa/mfp-pxa2xx.c | 2 +- arch/arm/mach-pxa/pxa25x.c | 2 +- arch/arm/mach-pxa/pxa27x.c | 2 +- arch/arm/mach-pxa/reset.c | 2 +- arch/arm/mach-pxa/sharpsl_pm.c | 2 +- arch/arm/mach-pxa/spitz.c | 2 +- arch/arm/mach-pxa/spitz_pm.c | 2 +- arch/arm/mach-s3c/dev-audio-s3c64xx.c | 2 +- arch/arm/mach-s3c/devs.c | 2 +- arch/arm/mach-s3c/mach-crag6410.c | 2 +- arch/arm/mach-s3c/pm-gpio.c | 2 +- arch/arm/mach-s3c/pm-s3c64xx.c | 2 +- arch/arm/mach-s3c/setup-fb-24bpp-s3c64xx.c | 2 +- arch/arm/mach-s3c/setup-i2c0-s3c64xx.c | 2 +- arch/arm/mach-s3c/setup-i2c1-s3c64xx.c | 2 +- arch/arm/mach-s3c/setup-keypad-s3c64xx.c | 2 +- arch/arm/mach-s3c/setup-sdhci-gpio-s3c64xx.c | 2 +- arch/arm/mach-s3c/setup-spi-s3c64xx.c | 2 +- arch/arm/mach-sa1100/collie.c | 2 +- arch/arm/mach-sa1100/generic.c | 2 +- arch/arm/mach-sa1100/h3600.c | 2 +- arch/arm/mach-sa1100/h3xxx.c | 2 +- arch/arm/plat-orion/mpp.c | 2 +- arch/m68k/coldfire/device.c | 2 +- arch/m68k/include/asm/mcfgpio.h | 2 +- arch/mips/alchemy/board-xxs1500.c | 2 +- arch/mips/alchemy/devboards/db1000.c | 2 +- arch/mips/alchemy/devboards/db1200.c | 2 +- arch/mips/alchemy/devboards/db1550.c | 2 +- arch/mips/bcm47xx/workarounds.c | 2 +- arch/mips/bcm63xx/boards/board_bcm963xx.c | 1 + .../include/asm/mach-bcm63xx/board_bcm963xx.h | 2 +- arch/mips/txx9/rbtx4927/setup.c | 2 +- arch/sh/boards/board-magicpanelr2.c | 2 +- arch/sh/boards/board-sh7757lcr.c | 2 +- arch/sh/boards/board-urquell.c | 2 +- arch/sh/boards/mach-ap325rxa/setup.c | 2 +- arch/sh/boards/mach-ecovec24/setup.c | 2 +- .../boards/mach-highlander/pinmux-r7785rp.c | 2 +- arch/sh/boards/mach-kfr2r09/lcd_wqvga.c | 2 +- arch/sh/boards/mach-kfr2r09/setup.c | 2 +- arch/sh/boards/mach-migor/lcd_qvga.c | 2 +- arch/sh/boards/mach-migor/setup.c | 2 +- arch/sh/boards/mach-rsk/devices-rsk7203.c | 2 +- arch/sh/boards/mach-rsk/devices-rsk7269.c | 1 - arch/sh/boards/mach-se/7724/setup.c | 2 +- .../include/mach-common/mach/magicpanelr2.h | 2 -- arch/sh/kernel/cpu/sh4a/setup-shx3.c | 2 +- drivers/gpib/gpio/gpib_bitbang.c | 2 +- drivers/gpio/TODO | 4 +--- drivers/gpio/gpiolib-cdev.c | 2 +- drivers/gpio/gpiolib-legacy.c | 3 +-- drivers/gpio/gpiolib.c | 2 +- drivers/input/keyboard/matrix_keypad.c | 2 +- drivers/media/pci/ddbridge/ddbridge.h | 2 +- .../platform/samsung/s3c-camif/camif-core.c | 2 +- drivers/media/usb/em28xx/em28xx-dvb.c | 2 +- drivers/mfd/aat2870-core.c | 2 +- drivers/mfd/arizona-irq.c | 2 +- drivers/mfd/lp3943.c | 2 +- drivers/mfd/si476x-cmd.c | 2 +- drivers/mfd/si476x-i2c.c | 2 +- drivers/mfd/sm501.c | 2 +- drivers/mfd/tps6105x.c | 2 +- drivers/mfd/tps65911-comparator.c | 2 +- drivers/mfd/wm8994-irq.c | 2 +- drivers/net/dsa/b53/b53_priv.h | 3 ++- drivers/net/dsa/microchip/ksz8.c | 2 +- drivers/net/ethernet/allwinner/sun4i-emac.c | 2 +- .../net/ethernet/apm/xgene/xgene_enet_main.c | 2 +- .../ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 2 +- drivers/net/phy/mdio_device.c | 2 +- drivers/pcmcia/bcm63xx_pcmcia.c | 2 +- drivers/pcmcia/db1xxx_ss.c | 2 +- drivers/pcmcia/sa1100_h3600.c | 2 +- drivers/pcmcia/soc_common.c | 2 +- drivers/pcmcia/xxs1500_ss.c | 2 +- drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c | 2 +- drivers/phy/rockchip/phy-rockchip-usbdp.c | 2 +- drivers/phy/ti/phy-j721e-wiz.c | 2 +- include/linux/gpio.h | 22 ------------------- include/linux/mfd/lp3943.h | 2 +- include/linux/mfd/ti-lmu.h | 2 +- include/linux/mfd/tps65910.h | 2 +- include/linux/mfd/ucb1x00.h | 2 +- sound/soc/codecs/cs42l84.c | 2 +- sound/soc/codecs/cx2072x.c | 2 +- sound/soc/codecs/dmic.c | 2 +- 110 files changed, 107 insertions(+), 134 deletions(-) delete mode 100644 include/linux/gpio.h
Signature · 35 lines
2.39.5 Cc: Bartosz Golaszewski <[email protected]> Cc: Andrew Lunn <[email protected]> Cc: Sebastian Hesselbarth <[email protected]> Cc: Gregory Clement <[email protected]> Cc: Frank Li <[email protected]> Cc: Robert Jarzmik <[email protected]> Cc: Krzysztof Kozlowski <[email protected]> Cc: Greg Ungerer <[email protected]> Cc: Thomas Bogendoerfer <[email protected]> Cc: Hauke Mehrtens <[email protected]> Cc: "Rafał Miłecki" <[email protected]> Cc: Yoshinori Sato <[email protected]> Cc: John Paul Adrian Glaubitz <[email protected]> Cc: Linus Walleij <[email protected]> Cc: Dmitry Torokhov <[email protected]> Cc: Jakub Kicinski <[email protected]> Cc: Paolo Abeni <[email protected]> Cc: Dominik Brodowski <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected]
PATCH 1/13 ARM: replace linux/gpio.h inclusions
From: Arnd Bergmann <[email protected]>
linux/gpio.h should no longer be used, convert these instead to either linux/gpio/consumer.h or linux/gpio/legacy.h as needed.
--- arch/arm/mach-davinci/da850.c | 2 +- arch/arm/mach-dove/mpp.c | 2 +- arch/arm/mach-mv78xx0/buffalo-wxl-setup.c | 2 +- arch/arm/mach-mv78xx0/irq.c | 2 +- arch/arm/mach-mv78xx0/mpp.c | 2 +- arch/arm/mach-mvebu/pm.c | 2 +- arch/arm/mach-mxs/mach-mxs.c | 2 +- arch/arm/mach-orion5x/board-d2net.c | 2 +- arch/arm/mach-orion5x/board-rd88f5182.c | 2 +- arch/arm/mach-orion5x/dns323-setup.c | 2 +- arch/arm/mach-orion5x/irq.c | 2 +- arch/arm/mach-orion5x/kurobox_pro-setup.c | 2 +- arch/arm/mach-orion5x/mv2120-setup.c | 2 +- arch/arm/mach-orion5x/net2big-setup.c | 2 +- arch/arm/mach-orion5x/terastation_pro2-setup.c | 2 +- arch/arm/mach-orion5x/ts209-setup.c | 2 +- arch/arm/mach-orion5x/ts409-setup.c | 2 +- arch/arm/mach-pxa/am200epd.c | 2 +- arch/arm/mach-pxa/am300epd.c | 2 +- arch/arm/mach-pxa/generic.c | 2 +- arch/arm/mach-pxa/gumstix.c | 2 +- arch/arm/mach-pxa/mfp-pxa2xx.c | 2 +- arch/arm/mach-pxa/pxa25x.c | 2 +- arch/arm/mach-pxa/pxa27x.c | 2 +- arch/arm/mach-pxa/reset.c | 2 +- arch/arm/mach-pxa/sharpsl_pm.c | 2 +- arch/arm/mach-pxa/spitz.c | 2 +- arch/arm/mach-pxa/spitz_pm.c | 2 +- arch/arm/mach-s3c/dev-audio-s3c64xx.c | 2 +- arch/arm/mach-s3c/devs.c | 2 +- arch/arm/mach-s3c/mach-crag6410.c | 2 +- arch/arm/mach-s3c/pm-gpio.c | 2 +- arch/arm/mach-s3c/pm-s3c64xx.c | 2 +- arch/arm/mach-s3c/setup-fb-24bpp-s3c64xx.c | 2 +- arch/arm/mach-s3c/setup-i2c0-s3c64xx.c | 2 +- arch/arm/mach-s3c/setup-i2c1-s3c64xx.c | 2 +- arch/arm/mach-s3c/setup-keypad-s3c64xx.c | 2 +- arch/arm/mach-s3c/setup-sdhci-gpio-s3c64xx.c | 2 +- arch/arm/mach-s3c/setup-spi-s3c64xx.c | 2 +- arch/arm/mach-sa1100/collie.c | 2 +- arch/arm/mach-sa1100/generic.c | 2 +- arch/arm/mach-sa1100/h3600.c | 2 +- arch/arm/mach-sa1100/h3xxx.c | 2 +- arch/arm/plat-orion/mpp.c | 2 +- 44 files changed, 44 insertions(+), 44 deletions(-)
arch/arm/mach-davinci/da850.c +1 -1
@@ -9,7 +9,7 @@* 2009 (c) MontaVista Software, Inc. */ -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/init.h> #include <linux/io.h> #include <linux/mfd/da8xx-cfgchip.h>
arch/arm/mach-dove/mpp.c +1 -1
@@ -6,7 +6,7 @@*/ #include <linux/kernel.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/io.h> #include <plat/mpp.h> #include <plat/orion-gpio.h>
arch/arm/mach-mv78xx0/buffalo-wxl-setup.c +1 -1
@@ -14,7 +14,7 @@#include <linux/mv643xx_eth.h> #include <linux/ethtool.h> #include <linux/i2c.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/gpio_keys.h> #include <linux/input.h> #include <asm/mach-types.h>
arch/arm/mach-mv78xx0/irq.c +1 -1
@@ -4,7 +4,7 @@* * MV78xx0 IRQ handling. */ -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/kernel.h> #include <linux/irq.h> #include <linux/io.h>
arch/arm/mach-mv78xx0/mpp.c +1 -1
@@ -4,7 +4,7 @@* * MPP functions for Marvell MV78x00 SoCs */ -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/kernel.h> #include <linux/init.h> #include <linux/io.h>
arch/arm/mach-mvebu/pm.c +1 -1
@@ -9,7 +9,7 @@#include <linux/cpu_pm.h> #include <linux/delay.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/io.h> #include <linux/kernel.h> #include <linux/mbus.h>
arch/arm/mach-mxs/mach-mxs.c +1 -1
@@ -9,7 +9,7 @@#include <linux/clkdev.h> #include <linux/delay.h> #include <linux/err.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/init.h> #include <linux/reboot.h> #include <linux/micrel_phy.h>
arch/arm/mach-orion5x/board-d2net.c +1 -1
@@ -13,7 +13,7 @@#include <linux/pci.h> #include <linux/irq.h> #include <linux/leds.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/gpio/machine.h> #include <asm/mach-types.h> #include <asm/mach/arch.h>
arch/arm/mach-orion5x/board-rd88f5182.c +1 -1
@@ -6,7 +6,7 @@* * Maintainer: Ronen Shitrit <[email protected]> */ -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/kernel.h> #include <linux/init.h> #include <linux/of.h>
arch/arm/mach-orion5x/dns323-setup.c +1 -1
@@ -13,7 +13,7 @@* License, or (at your option) any later version. * */ -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/gpio/machine.h> #include <linux/kernel.h> #include <linux/init.h>
arch/arm/mach-orion5x/irq.c +1 -1
@@ -6,7 +6,7 @@* * Maintainer: Tzachi Perelstein <[email protected]> */ -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/kernel.h> #include <linux/irq.h> #include <linux/io.h>
arch/arm/mach-orion5x/kurobox_pro-setup.c +1 -1
@@ -4,7 +4,7 @@* * Maintainer: Ronen Shitrit <[email protected]> */ -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/kernel.h> #include <linux/init.h> #include <linux/platform_device.h>
arch/arm/mach-orion5x/mv2120-setup.c +1 -1
@@ -7,7 +7,7 @@* published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. */ -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/gpio/machine.h> #include <linux/kernel.h> #include <linux/init.h>
arch/arm/mach-orion5x/net2big-setup.c +1 -1
@@ -17,7 +17,7 @@#include <linux/input.h> #include <linux/i2c.h> #include <linux/ata_platform.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/gpio/machine.h> #include <linux/delay.h> #include <asm/mach-types.h>
arch/arm/mach-orion5x/terastation_pro2-setup.c +1 -1
@@ -4,7 +4,7 @@* * Maintainer: Sylver Bruneau <[email protected]> */ -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/kernel.h> #include <linux/init.h> #include <linux/platform_device.h>
arch/arm/mach-orion5x/ts209-setup.c +1 -1
@@ -4,7 +4,7 @@* * Maintainer: Byron Bradley <[email protected]> */ -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/kernel.h> #include <linux/init.h> #include <linux/platform_device.h>
arch/arm/mach-orion5x/ts409-setup.c +1 -1
@@ -7,7 +7,7 @@* Copyright (C) 2008 Sylver Bruneau <[email protected]> * Copyright (C) 2008 Martin Michlmayr <[email protected]> */ -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/gpio/machine.h> #include <linux/kernel.h> #include <linux/init.h>
arch/arm/mach-pxa/am200epd.c +1 -1
@@ -28,7 +28,7 @@#include <linux/init.h> #include <linux/platform_device.h> #include <linux/irq.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include "pxa25x.h" #include "gumstix.h"
arch/arm/mach-pxa/am300epd.c +1 -1
@@ -26,7 +26,7 @@#include <linux/init.h> #include <linux/platform_device.h> #include <linux/irq.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include "gumstix.h" #include "mfp-pxa25x.h"
arch/arm/mach-pxa/generic.c +1 -1
@@ -13,7 +13,7 @@* initialization stuff for PXA machines which can be overridden later if * need be. */ -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/init.h>
arch/arm/mach-pxa/gumstix.c +1 -1
@@ -22,7 +22,7 @@#include <linux/mtd/partitions.h> #include <linux/gpio/machine.h> #include <linux/gpio/property.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/err.h> #include <linux/clk.h>
arch/arm/mach-pxa/mfp-pxa2xx.c +1 -1
@@ -9,7 +9,7 @@* on PXA3xx, what's more important, the low power pin state and * wakeup detection are also supported by the same framework. */ -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/gpio-pxa.h> #include <linux/module.h> #include <linux/kernel.h>
arch/arm/mach-pxa/pxa25x.c +1 -1
@@ -15,7 +15,7 @@*/ #include <linux/dmaengine.h> #include <linux/dma/pxa-dma.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/gpio-pxa.h> #include <linux/module.h> #include <linux/kernel.h>
arch/arm/mach-pxa/pxa27x.c +1 -1
@@ -10,7 +10,7 @@*/ #include <linux/dmaengine.h> #include <linux/dma/pxa-dma.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/gpio-pxa.h> #include <linux/module.h> #include <linux/kernel.h>
arch/arm/mach-pxa/reset.c +1 -1
@@ -2,7 +2,7 @@#include <linux/kernel.h> #include <linux/module.h> #include <linux/delay.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/io.h> #include <asm/proc-fns.h> #include <asm/system_misc.h>
arch/arm/mach-pxa/sharpsl_pm.c +1 -1
@@ -19,7 +19,7 @@#include <linux/delay.h> #include <linux/leds.h> #include <linux/suspend.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/io.h> #include <asm/mach-types.h>
arch/arm/mach-pxa/spitz.c +1 -1
@@ -12,7 +12,7 @@#include <linux/platform_device.h> #include <linux/delay.h> #include <linux/gpio_keys.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/gpio/machine.h> #include <linux/gpio/property.h> #include <linux/leds.h>
arch/arm/mach-pxa/spitz_pm.c +1 -1
@@ -10,7 +10,7 @@#include <linux/init.h> #include <linux/kernel.h> #include <linux/delay.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/gpio-pxa.h> #include <linux/interrupt.h> #include <linux/platform_device.h>
arch/arm/mach-s3c/dev-audio-s3c64xx.c +1 -1
@@ -7,7 +7,7 @@#include <linux/string.h> #include <linux/platform_device.h> #include <linux/dma-mapping.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/export.h> #include "irqs.h"
arch/arm/mach-s3c/devs.c +1 -1
@@ -5,7 +5,7 @@// // Base Samsung platform device definitions -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/kernel.h> #include <linux/types.h> #include <linux/interrupt.h>
arch/arm/mach-s3c/mach-crag6410.c +1 -1
@@ -15,7 +15,7 @@#include <linux/io.h> #include <linux/init.h> #include <linux/input-event-codes.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/gpio/machine.h> #include <linux/leds.h> #include <linux/delay.h>
arch/arm/mach-s3c/pm-gpio.c +1 -1
@@ -11,7 +11,7 @@#include <linux/device.h> #include <linux/init.h> #include <linux/io.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include "gpio-samsung.h"
arch/arm/mach-s3c/pm-s3c64xx.c +1 -1
@@ -11,7 +11,7 @@#include <linux/suspend.h> #include <linux/serial_core.h> #include <linux/io.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/pm_domain.h> #include "map.h"
arch/arm/mach-s3c/setup-fb-24bpp-s3c64xx.c +1 -1
@@ -9,7 +9,7 @@#include <linux/kernel.h> #include <linux/types.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include "fb.h" #include "gpio-cfg.h"
arch/arm/mach-s3c/setup-i2c0-s3c64xx.c +1 -1
@@ -9,7 +9,7 @@#include <linux/kernel.h> #include <linux/types.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> struct platform_device ;/* don't need the contents */
arch/arm/mach-s3c/setup-i2c1-s3c64xx.c +1 -1
@@ -9,7 +9,7 @@#include <linux/kernel.h> #include <linux/types.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> struct platform_device ;/* don't need the contents */
arch/arm/mach-s3c/setup-keypad-s3c64xx.c +1 -1
@@ -5,7 +5,7 @@// // GPIO configuration for S3C64XX KeyPad device -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include "gpio-cfg.h" #include "keypad.h" #include "gpio-samsung.h"
arch/arm/mach-s3c/setup-sdhci-gpio-s3c64xx.c +1 -1
@@ -11,7 +11,7 @@#include <linux/interrupt.h> #include <linux/platform_device.h> #include <linux/io.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include "gpio-cfg.h" #include "sdhci.h"
arch/arm/mach-s3c/setup-spi-s3c64xx.c +1 -1
@@ -3,7 +3,7 @@// Copyright (C) 2011 Samsung Electronics Ltd. // http://www.samsung.com/ -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/platform_data/spi-s3c64xx.h> #include "gpio-cfg.h" #include "gpio-samsung.h"
arch/arm/mach-sa1100/collie.c +1 -1
@@ -29,7 +29,7 @@#include <linux/timer.h> #include <linux/gpio_keys.h> #include <linux/input.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/gpio/machine.h> #include <linux/power/gpio-charger.h>
arch/arm/mach-sa1100/generic.c +1 -1
@@ -6,7 +6,7 @@* * Code common to all SA11x0 machines. */ -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/gpio/machine.h> #include <linux/module.h> #include <linux/kernel.h>
arch/arm/mach-sa1100/h3600.c +1 -1
@@ -8,7 +8,7 @@#include <linux/init.h> #include <linux/kernel.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <video/sa1100fb.h>
arch/arm/mach-sa1100/h3xxx.c +1 -1
@@ -8,7 +8,7 @@#include <linux/kernel.h> #include <linux/gpio/machine.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/gpio_keys.h> #include <linux/input.h> #include <linux/mtd/mtd.h>
arch/arm/plat-orion/mpp.c +1 -1
@@ -12,7 +12,7 @@#include <linux/init.h> #include <linux/mbus.h> #include <linux/io.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <plat/orion-gpio.h> #include <plat/mpp.h>
Signature · 1 line
2.39.5
PATCH 2/13 m68k/coldfire: replace linux/gpio.h inclusions
In reply to Arnd BergmannFrom: Arnd Bergmann <[email protected]>
linux/gpio.h should no longer be used, convert these instead to linux/gpio/legacy.h for coldfire.
--- arch/m68k/coldfire/device.c | 2 +- arch/m68k/include/asm/mcfgpio.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/m68k/coldfire/device.c +1 -1
@@ -12,7 +12,7 @@#include <linux/init.h> #include <linux/io.h> #include <linux/spi/spi.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/fec.h> #include <linux/dmaengine.h> #include <asm/traps.h>
arch/m68k/include/asm/mcfgpio.h +1 -1
@@ -16,7 +16,7 @@ int __mcfgpio_request(unsigned gpio);void __mcfgpio_free (unsigned gpio);#ifdef CONFIG_GPIOLIB -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #else /* our alternate 'gpiolib' functions */
Signature · 1 line
2.39.5
PATCH 3/13 mips: replace linux/gpio.h inclusions
In reply to Arnd BergmannFrom: Arnd Bergmann <[email protected]>
linux/gpio.h should no longer be used, convert these instead to either linux/gpio/consumer.h or linux/gpio/legacy.h as needed.
--- arch/mips/alchemy/board-xxs1500.c | 2 +- arch/mips/alchemy/devboards/db1000.c | 2 +- arch/mips/alchemy/devboards/db1200.c | 2 +- arch/mips/alchemy/devboards/db1550.c | 2 +- arch/mips/bcm47xx/workarounds.c | 2 +- arch/mips/bcm63xx/boards/board_bcm963xx.c | 1 + arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 2 +- arch/mips/txx9/rbtx4927/setup.c | 2 +- 8 files changed, 8 insertions(+), 7 deletions(-)
arch/mips/alchemy/board-xxs1500.c +1 -1
@@ -11,7 +11,7 @@#include <linux/init.h> #include <linux/interrupt.h> #include <linux/platform_device.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/delay.h> #include <linux/pm.h> #include <asm/bootinfo.h>
arch/mips/alchemy/devboards/db1000.c +1 -1
@@ -8,7 +8,7 @@#include <linux/clk.h> #include <linux/dma-mapping.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/gpio/machine.h> #include <linux/gpio/property.h> #include <linux/init.h>
arch/mips/alchemy/devboards/db1200.c +1 -1
@@ -7,7 +7,7 @@#include <linux/clk.h> #include <linux/dma-mapping.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/i2c.h> #include <linux/init.h> #include <linux/interrupt.h>
arch/mips/alchemy/devboards/db1550.c +1 -1
@@ -7,7 +7,7 @@#include <linux/clk.h> #include <linux/dma-mapping.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/i2c.h> #include <linux/init.h> #include <linux/io.h>
arch/mips/bcm47xx/workarounds.c +1 -1
@@ -1,7 +1,7 @@// SPDX-License-Identifier: GPL-2.0 #include "bcm47xx_private.h" -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <bcm47xx_board.h> #include <bcm47xx.h>
arch/mips/bcm63xx/boards/board_bcm963xx.c +1 -0
@@ -7,6 +7,7 @@#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt#include <linux/init.h> +#include <linux/gpio/legacy.h> #include <linux/kernel.h> #include <linux/string.h> #include <linux/platform_device.h>
arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h +1 -1
@@ -3,7 +3,7 @@#define BOARD_BCM963XX_H_ #include <linux/types.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/leds.h> #include <bcm63xx_dev_enet.h> #include <bcm63xx_dev_usb_usbd.h>
arch/mips/txx9/rbtx4927/setup.c +1 -1
@@ -48,7 +48,7 @@#include <linux/ioport.h> #include <linux/platform_device.h> #include <linux/delay.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/leds.h> #include <asm/io.h> #include <asm/reboot.h>
Signature · 1 line
2.39.5
PATCH 4/13 sh: replace linux/gpio.h inclusions
In reply to Arnd BergmannFrom: Arnd Bergmann <[email protected]>
linux/gpio.h should no longer be used, convert these instead to linux/gpio/legacy.h for the sh boards using the legacy interfaces, or remove it where it is not needed at all.
--- arch/sh/boards/board-magicpanelr2.c | 2 +- arch/sh/boards/board-sh7757lcr.c | 2 +- arch/sh/boards/board-urquell.c | 2 +- arch/sh/boards/mach-ap325rxa/setup.c | 2 +- arch/sh/boards/mach-ecovec24/setup.c | 2 +- arch/sh/boards/mach-highlander/pinmux-r7785rp.c | 2 +- arch/sh/boards/mach-kfr2r09/lcd_wqvga.c | 2 +- arch/sh/boards/mach-kfr2r09/setup.c | 2 +- arch/sh/boards/mach-migor/lcd_qvga.c | 2 +- arch/sh/boards/mach-migor/setup.c | 2 +- arch/sh/boards/mach-rsk/devices-rsk7203.c | 2 +- arch/sh/boards/mach-rsk/devices-rsk7269.c | 1 - arch/sh/boards/mach-se/7724/setup.c | 2 +- arch/sh/include/mach-common/mach/magicpanelr2.h | 2 -- arch/sh/kernel/cpu/sh4a/setup-shx3.c | 2 +- 15 files changed, 13 insertions(+), 16 deletions(-)
arch/sh/boards/board-magicpanelr2.c +1 -1
@@ -10,7 +10,7 @@#include <linux/irq.h> #include <linux/platform_device.h> #include <linux/delay.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/regulator/fixed.h> #include <linux/regulator/machine.h> #include <linux/smsc911x.h>
arch/sh/boards/board-sh7757lcr.c +1 -1
@@ -7,7 +7,7 @@#include <linux/init.h> #include <linux/platform_device.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/irq.h> #include <linux/regulator/fixed.h> #include <linux/regulator/machine.h>
arch/sh/boards/board-urquell.c +1 -1
@@ -14,7 +14,7 @@#include <linux/smc91x.h> #include <linux/mtd/physmap.h> #include <linux/delay.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/irq.h> #include <linux/clk.h> #include <linux/sh_intc.h>
arch/sh/boards/mach-ap325rxa/setup.c +1 -1
@@ -17,7 +17,7 @@#include <linux/clkdev.h> #include <linux/delay.h> #include <linux/device.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/gpio/consumer.h> #include <linux/gpio/machine.h> #include <linux/i2c.h>
arch/sh/boards/mach-ecovec24/setup.c +1 -1
@@ -20,7 +20,7 @@#include <linux/mmc/host.h> #include <linux/platform_data/sh_mmcif.h> #include <linux/mtd/physmap.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/gpio/machine.h> #include <linux/platform_data/gpio_backlight.h> #include <linux/platform_data/tmio.h>
arch/sh/boards/mach-highlander/pinmux-r7785rp.c +1 -1
@@ -3,7 +3,7 @@* Copyright (C) 2008 Paul Mundt */ #include <linux/init.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <cpu/sh7785.h> #include <mach/highlander.h>
arch/sh/boards/mach-kfr2r09/lcd_wqvga.c +1 -1
@@ -14,7 +14,7 @@#include <linux/init.h> #include <linux/kernel.h> #include <linux/module.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <video/sh_mobile_lcdc.h> #include <mach/kfr2r09.h> #include <cpu/sh7724.h>
arch/sh/boards/mach-kfr2r09/setup.c +1 -1
@@ -14,7 +14,7 @@#include <linux/clkdev.h> #include <linux/delay.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/gpio/machine.h> #include <linux/i2c.h> #include <linux/init.h>
arch/sh/boards/mach-migor/lcd_qvga.c +1 -1
@@ -14,7 +14,7 @@#include <linux/init.h> #include <linux/kernel.h> #include <linux/module.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <video/sh_mobile_lcdc.h> #include <cpu/sh7722.h> #include <mach/migor.h>
arch/sh/boards/mach-migor/setup.c +1 -1
@@ -22,7 +22,7 @@#include <linux/smc91x.h> #include <linux/delay.h> #include <linux/clk.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/gpio/machine.h> #include <linux/videodev2.h> #include <linux/sh_intc.h>
arch/sh/boards/mach-rsk/devices-rsk7203.c +1 -1
@@ -10,7 +10,7 @@#include <linux/interrupt.h> #include <linux/smsc911x.h> #include <linux/input.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/gpio_keys.h> #include <linux/leds.h> #include <asm/machvec.h>
arch/sh/boards/mach-rsk/devices-rsk7269.c +0 -1
@@ -11,7 +11,6 @@#include <linux/interrupt.h> #include <linux/input.h> #include <linux/smsc911x.h> -#include <linux/gpio.h> #include <asm/machvec.h> #include <asm/io.h>
arch/sh/boards/mach-se/7724/setup.c +1 -1
@@ -15,7 +15,7 @@#include <linux/delay.h> #include <linux/device.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/init.h> #include <linux/input.h> #include <linux/input/sh_keysc.h>
arch/sh/include/mach-common/mach/magicpanelr2.h +0 -2
@@ -10,8 +10,6 @@#ifndef __ASM_SH_MAGICPANELR2_H#define __ASM_SH_MAGICPANELR2_H -#include <linux/gpio.h> -#define __IO_PREFIX mpr2#include <asm/io_generic.h>
arch/sh/kernel/cpu/sh4a/setup-shx3.c +1 -1
@@ -9,7 +9,7 @@#include <linux/serial.h> #include <linux/serial_sci.h> #include <linux/io.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/sh_timer.h> #include <linux/sh_intc.h> #include <cpu/shx3.h>
Signature · 1 line
2.39.5
PATCH 5/13 mfd: replace linux/gpio.h inclusions
In reply to Arnd BergmannFrom: Arnd Bergmann <[email protected]>
linux/gpio.h should no longer be used, convert these instead to either linux/gpio/consumer.h or linux/gpio/legacy.h as needed.
--- drivers/mfd/aat2870-core.c | 2 +- drivers/mfd/arizona-irq.c | 2 +- drivers/mfd/lp3943.c | 2 +- drivers/mfd/si476x-cmd.c | 2 +- drivers/mfd/si476x-i2c.c | 2 +- drivers/mfd/sm501.c | 2 +- drivers/mfd/tps6105x.c | 2 +- drivers/mfd/tps65911-comparator.c | 2 +- drivers/mfd/wm8994-irq.c | 2 +- include/linux/mfd/lp3943.h | 2 +- include/linux/mfd/ti-lmu.h | 2 +- include/linux/mfd/tps65910.h | 2 +- include/linux/mfd/ucb1x00.h | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-)
drivers/mfd/aat2870-core.c +1 -1
@@ -13,7 +13,7 @@#include <linux/uaccess.h> #include <linux/i2c.h> #include <linux/delay.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/mfd/core.h> #include <linux/mfd/aat2870.h> #include <linux/regulator/machine.h>
drivers/mfd/arizona-irq.c +1 -1
@@ -8,7 +8,7 @@*/ #include <linux/delay.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/interrupt.h> #include <linux/irq.h> #include <linux/irqdomain.h>
drivers/mfd/lp3943.c +1 -1
@@ -28,7 +28,7 @@*/ #include <linux/err.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/i2c.h> #include <linux/mfd/core.h> #include <linux/mfd/lp3943.h>
drivers/mfd/si476x-cmd.c +1 -1
@@ -15,7 +15,7 @@#include <linux/atomic.h> #include <linux/i2c.h> #include <linux/device.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/videodev2.h> #include <linux/mfd/si476x-core.h>
drivers/mfd/si476x-i2c.c +1 -1
@@ -13,7 +13,7 @@#include <linux/slab.h> #include <linux/interrupt.h> #include <linux/delay.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/regulator/consumer.h> #include <linux/i2c.h> #include <linux/err.h>
drivers/mfd/sm501.c +1 -1
@@ -35,7 +35,7 @@ struct sm501_device {struct sm501_gpio ; #ifdef CONFIG_MFD_SM501_GPIO -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> struct sm501_gpio_chip { struct gpio_chip gpio;
drivers/mfd/tps6105x.c +1 -1
@@ -16,7 +16,7 @@#include <linux/init.h> #include <linux/i2c.h> #include <linux/regmap.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/spinlock.h> #include <linux/slab.h> #include <linux/err.h>
drivers/mfd/tps65911-comparator.c +1 -1
@@ -14,7 +14,7 @@#include <linux/err.h> #include <linux/platform_device.h> #include <linux/debugfs.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/mfd/tps65910.h> #define COMP1 0
drivers/mfd/wm8994-irq.c +1 -1
@@ -9,7 +9,7 @@#include <linux/kernel.h> #include <linux/module.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/i2c.h> #include <linux/irq.h> #include <linux/mfd/core.h>
include/linux/mfd/lp3943.h +1 -1
@@ -10,7 +10,7 @@#ifndef __MFD_LP3943_H__#define __MFD_LP3943_H__ -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/regmap.h> /* Registers */
include/linux/mfd/ti-lmu.h +1 -1
@@ -10,7 +10,7 @@#ifndef __MFD_TI_LMU_H__#define __MFD_TI_LMU_H__ -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/notifier.h> #include <linux/regmap.h> #include <linux/gpio/consumer.h>
include/linux/mfd/tps65910.h +1 -1
@@ -12,7 +12,7 @@#ifndef __LINUX_MFD_TPS65910_H#define __LINUX_MFD_TPS65910_H -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/regmap.h> /* TPS chip id list */
include/linux/mfd/ucb1x00.h +1 -1
@@ -9,7 +9,7 @@#include <linux/device.h> #include <linux/mfd/mcp.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/gpio/driver.h> #include <linux/mutex.h>
Signature · 1 line
2.39.5
PATCH 6/13 net: replace linux/gpio.h inclusions
In reply to Arnd BergmannFrom: Arnd Bergmann <[email protected]>
linux/gpio.h should no longer be used, change these in drivers/net to linux/gpio/consumer.h where possible, with b53 being the only one still using linux/gpio/legacy.h.
--- drivers/net/dsa/b53/b53_priv.h | 3 ++- drivers/net/dsa/microchip/ksz8.c | 2 +- drivers/net/ethernet/allwinner/sun4i-emac.c | 2 +- drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 2 +- drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 2 +- drivers/net/phy/mdio_device.c | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-)
drivers/net/dsa/b53/b53_priv.h +2 -1
@@ -23,6 +23,7 @@#include <linux/mutex.h> #include <linux/phylink.h> #include <linux/etherdevice.h> +#include <linux/gpio/consumer.h> #include <net/dsa.h> #include "b53_regs.h"
@@ -467,7 +468,7 @@ static inline void b53_arl_search_read(struct b53_device *dev, u8 idx,#ifdef CONFIG_BCM47XX #include <linux/bcm47xx_nvram.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <bcm47xx_board.h> static inline struct gpio_desc *b53_switch_get_reset_gpio (struct b53_device *dev) {
drivers/net/dsa/microchip/ksz8.c +1 -1
@@ -18,7 +18,7 @@#include <linux/delay.h> #include <linux/dsa/ksz_common.h> #include <linux/export.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/if_vlan.h> #include <linux/kernel.h> #include <linux/module.h>
drivers/net/ethernet/allwinner/sun4i-emac.c +1 -1
@@ -15,7 +15,7 @@#include <linux/clk.h> #include <linux/etherdevice.h> #include <linux/ethtool.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/interrupt.h> #include <linux/irq.h> #include <linux/mii.h>
drivers/net/ethernet/apm/xgene/xgene_enet_main.c +1 -1
@@ -7,7 +7,7 @@* Keyur Chudgar <[email protected]> */ -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include "xgene_enet_main.h" #include "xgene_enet_hw.h" #include "xgene_enet_sgmac.h"
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +1 -1
@@ -16,7 +16,7 @@#include <linux/net_tstamp.h> #include <linux/ptp_classify.h> #include <linux/ptp_pch.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #define PCH_GBE_MAR_ENTRIES 16#define PCH_GBE_SHORT_PKT 64
drivers/net/phy/mdio_device.c +1 -1
@@ -8,7 +8,7 @@#include <linux/delay.h> #include <linux/errno.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/gpio/consumer.h> #include <linux/init.h> #include <linux/interrupt.h>
Signature · 1 line
2.39.5
PATCH 7/13 ASoC: replace linux/gpio.h inclusions
In reply to Arnd BergmannFrom: Arnd Bergmann <[email protected]>
linux/gpio.h is going away,s o use linux/gpio/consumer.h instead.
--- sound/soc/codecs/cs42l84.c | 2 +- sound/soc/codecs/cx2072x.c | 2 +- sound/soc/codecs/dmic.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
sound/soc/codecs/cs42l84.c +1 -1
@@ -16,7 +16,7 @@#include <linux/init.h> #include <linux/delay.h> #include <linux/i2c.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/regmap.h> #include <linux/slab.h> #include <linux/acpi.h>
sound/soc/codecs/cx2072x.c +1 -1
@@ -11,7 +11,7 @@#include <linux/acpi.h> #include <linux/clk.h> #include <linux/delay.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/init.h> #include <linux/i2c.h> #include <linux/module.h>
sound/soc/codecs/dmic.c +1 -1
@@ -6,7 +6,7 @@*/ #include <linux/delay.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/gpio/consumer.h> #include <linux/platform_device.h> #include <linux/regulator/consumer.h>
Signature · 1 line
2.39.5
PATCH 8/13 pcmcia: replace linux/gpio.h inclusions
In reply to Arnd BergmannFrom: Arnd Bergmann <[email protected]>
The pcmcia drivers all use the legacy interfaces, so convert to include linux/gpio/legacy.h instead.
--- drivers/pcmcia/bcm63xx_pcmcia.c | 2 +- drivers/pcmcia/db1xxx_ss.c | 2 +- drivers/pcmcia/sa1100_h3600.c | 2 +- drivers/pcmcia/soc_common.c | 2 +- drivers/pcmcia/xxs1500_ss.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
drivers/pcmcia/bcm63xx_pcmcia.c +1 -1
@@ -14,7 +14,7 @@#include <linux/slab.h> #include <linux/delay.h> #include <linux/pci.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <bcm63xx_regs.h> #include <bcm63xx_io.h>
drivers/pcmcia/db1xxx_ss.c +1 -1
@@ -23,7 +23,7 @@*/ #include <linux/delay.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/interrupt.h> #include <linux/pm.h> #include <linux/module.h>
drivers/pcmcia/sa1100_h3600.c +1 -1
@@ -11,7 +11,7 @@#include <linux/interrupt.h> #include <linux/init.h> #include <linux/delay.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <mach/hardware.h> #include <asm/irq.h>
drivers/pcmcia/soc_common.c +1 -1
@@ -32,8 +32,8 @@#include <linux/cpufreq.h> -#include <linux/gpio.h> #include <linux/gpio/consumer.h> +#include <linux/gpio/legacy.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/io.h>
drivers/pcmcia/xxs1500_ss.c +1 -1
@@ -7,7 +7,7 @@*/ #include <linux/delay.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/interrupt.h> #include <linux/io.h> #include <linux/ioport.h>
Signature · 1 line
2.39.5
PATCH 9/13 phy: replace linux/gpio.h inclusions
In reply to Arnd BergmannFrom: Arnd Bergmann <[email protected]>
linux/gpio.h should no longer be used, convert these instead to either linux/gpio/consumer.h or linux/gpio/legacy.h as needed.
--- drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c | 2 +- drivers/phy/rockchip/phy-rockchip-usbdp.c | 2 +- drivers/phy/ti/phy-j721e-wiz.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c +1 -1
@@ -3,7 +3,7 @@#include <linux/delay.h> #include <linux/extcon-provider.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/gpio/consumer.h> #include <linux/init.h> #include <linux/interrupt.h>
drivers/phy/rockchip/phy-rockchip-usbdp.c +1 -1
@@ -11,7 +11,7 @@#include <linux/bits.h> #include <linux/clk.h> #include <linux/delay.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/mfd/syscon.h> #include <linux/mod_devicetable.h> #include <linux/module.h>
drivers/phy/ti/phy-j721e-wiz.c +1 -1
@@ -11,7 +11,7 @@#include <linux/slab.h> #include <linux/clk.h> #include <linux/clk-provider.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/gpio/consumer.h> #include <linux/io.h> #include <linux/module.h>
Signature · 1 line
2.39.5
PATCH 10/13 media: replace linux/gpio.h inclusions
In reply to Arnd BergmannFrom: Arnd Bergmann <[email protected]>
linux/gpio.h should no longer be used, convert these instead to either linux/gpio/consumer.h or linux/gpio/legacy.h as needed.
--- drivers/media/pci/ddbridge/ddbridge.h | 2 +- drivers/media/platform/samsung/s3c-camif/camif-core.c | 2 +- drivers/media/usb/em28xx/em28xx-dvb.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/media/pci/ddbridge/ddbridge.h +1 -1
@@ -14,7 +14,7 @@#include <linux/delay.h> #include <linux/device.h> #include <linux/dvb/ca.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/i2c.h> #include <linux/init.h> #include <linux/interrupt.h>
drivers/media/platform/samsung/s3c-camif/camif-core.c +1 -1
@@ -12,7 +12,7 @@#include <linux/delay.h> #include <linux/device.h> #include <linux/errno.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/i2c.h> #include <linux/interrupt.h> #include <linux/io.h>
drivers/media/usb/em28xx/em28xx-dvb.c +1 -1
@@ -29,7 +29,7 @@#include <media/dmxdev.h> #include <media/tuner.h> #include "tuner-simple.h" -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include "lgdt330x.h" #include "lgdt3305.h"
Signature · 1 line
2.39.5
PATCH 11/13 Input: matrix_keyboard - replace linux/gpio.h inclusion
In reply to Arnd BergmannFrom: Arnd Bergmann <[email protected]>
linux/gpio.h is going away, so use linux/gpio/consumer.h instead.
--- drivers/input/keyboard/matrix_keypad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/keyboard/matrix_keypad.c +1 -1
@@ -16,7 +16,7 @@#include <linux/interrupt.h> #include <linux/jiffies.h> #include <linux/module.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/input/matrix_keypad.h> #include <linux/slab.h> #include <linux/of.h>
Signature · 1 line
2.39.5
PATCH 12/13 gpib: gpio: replace linux/gpio.h inclusion
In reply to Arnd BergmannFrom: Arnd Bergmann <[email protected]>
linux/gpio.h is going away, so use linux/gpio/consumer.h instead.
--- drivers/gpib/gpio/gpib_bitbang.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpib/gpio/gpib_bitbang.c +1 -1
@@ -64,7 +64,7 @@#include <linux/gpio/consumer.h> #include <linux/gpio/driver.h> #include <linux/gpio/machine.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/irq.h> static int sn7516x_used =1 , sn7516x;
Signature · 1 line
2.39.5
PATCH 13/13 gpiolib: remove linux/gpio.h
In reply to Arnd BergmannFrom: Arnd Bergmann <[email protected]>
After all other drivers have converted to linux/gpio/consumer.h or linux/gpio/legacy.h, remove the final leftover bits here.
--- MAINTAINERS | 1 - drivers/gpio/TODO | 4 +--- drivers/gpio/gpiolib-cdev.c | 2 +- drivers/gpio/gpiolib-legacy.c | 3 +-- drivers/gpio/gpiolib.c | 2 +- include/linux/gpio.h | 22 ---------------------- 6 files changed, 4 insertions(+), 30 deletions(-) delete mode 100644 include/linux/gpio.h
MAINTAINERS +0 -1
@@ -11175,7 +11175,6 @@ F: Documentation/devicetree/bindings/gpio/ F: Documentation/driver-api/gpio/ F: drivers/gpio/ F: include/dt-bindings/gpio/ -F: include/linux/gpio.h F: include/linux/gpio/ K: (devm_)?gpio_(request|free|direction|get|set) K: GPIOD_FLAGS_BIT_NONEXCLUSIVE
drivers/gpio/TODO +1 -3
@@ -52,9 +52,7 @@ Work items: base can be made dynamic (set to -1) if CONFIG_GPIO_SYSFS is disabled. - When this work is complete (will require some of the items in the - following ongoing work as well) we can delete the old global - numberspace accessors from <linux/gpio.h> and eventually delete - <linux/gpio.h> altogether. + following ongoing work as well) we can delete <linux/gpio/lagacy.h>. -------------------------------------------------------------------------------
drivers/gpio/gpiolib-cdev.c +1 -1
@@ -11,7 +11,7 @@#include <linux/device.h> #include <linux/err.h> #include <linux/file.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/gpio/driver.h> #include <linux/hte.h> #include <linux/interrupt.h>
drivers/gpio/gpiolib-legacy.c +1 -2
@@ -7,8 +7,7 @@#include <linux/gpio/consumer.h> #include <linux/gpio/driver.h> - -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include "gpiolib.h"
drivers/gpio/gpiolib.c +1 -1
@@ -29,7 +29,7 @@#include <linux/string.h> #include <linux/string_choices.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/gpio/driver.h> #include <linux/gpio/machine.h>
include/linux/gpio.h deleted +0 -22
@@ -1,22 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* -* NOTE: This header *must not* be included. -* -* If you're implementing a GPIO driver, only include <linux/gpio/driver.h> -* If you're implementing a GPIO consumer, only include <linux/gpio/consumer.h> -* If you're using the legacy interfaces, include <linux/gpio/legacy.h> -*/ - -#ifndef __LINUX_GPIO_H -#define __LINUX_GPIO_H - -#include <linux/types.h> -#ifdef CONFIG_GPIOLIB -#include <linux/gpio/consumer.h> -#endif - -#ifdef CONFIG_GPIOLIB_LEGACY -#include <linux/gpio/legacy.h> -#endif /* CONFIG_GPIOLIB_LEGACY */ - -#endif /* __LINUX_GPIO_H */
Signature · 1 line
2.39.5
Quoted 8 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The
linux/gpio.hheader used to be the global definition for the gpio interfaces, with 1100 users back in linux-3.17. In linux-7.2, only about 130 of those remain, so this series cleans out the rest.In each subsystem, we can replace the header either with
linux/gpio/consumer.hfor users of the modern gpio descriptor interface,
A few of them already used <linux/gpio/consumer.h>, and is duplicated now.
Signature · 8 lines
Andreas Schwab, [email protected] GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
Quoted 8 lines · Andreas Schwab
Quoted 6 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The
linux/gpio.hheader used to be the global definition for the gpio interfaces, with 1100 users back in linux-3.17. In linux-7.2, only about 130 of those remain, so this series cleans out the rest.
Quoted 5 lines
Quoted 2 lines
In each subsystem, we can replace the header either with
linux/gpio/consumer.hfor users of the modern gpio descriptor interface,A few of them already used <
linux/gpio/consumer.h>, and is duplicated now.
Indeed, I have removed the extra ones now and folded those into the patches.
Arnd
drivers/gpib/gpio/gpib_bitbang.c +0 -1
@@ -64,7 +64,6 @@#include <linux/gpio/consumer.h> #include <linux/gpio/driver.h> #include <linux/gpio/machine.h> -#include <linux/gpio/consumer.h> #include <linux/irq.h> static int sn7516x_used =1 , sn7516x;
drivers/input/keyboard/matrix_keypad.c +0 -1
@@ -16,7 +16,6 @@#include <linux/interrupt.h> #include <linux/jiffies.h> #include <linux/module.h> -#include <linux/gpio/consumer.h> #include <linux/input/matrix_keypad.h> #include <linux/slab.h> #include <linux/of.h>
drivers/input/misc/soc_button_array.c +0 -1
@@ -15,7 +15,6 @@#include <linux/dmi.h> #include <linux/gpio/consumer.h> #include <linux/gpio_keys.h> -#include <linux/gpio/consumer.h> #include <linux/platform_device.h> static bool use_low_level_irq;
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +0 -1
@@ -16,7 +16,6 @@#include <linux/net_tstamp.h> #include <linux/ptp_classify.h> #include <linux/ptp_pch.h> -#include <linux/gpio/consumer.h> #define PCH_GBE_MAR_ENTRIES 16#define PCH_GBE_SHORT_PKT 64
drivers/net/phy/mdio_device.c +0 -1
@@ -9,7 +9,6 @@#include <linux/delay.h> #include <linux/errno.h> #include <linux/gpio/consumer.h> -#include <linux/gpio/consumer.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/kernel.h>
drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c +0 -1
@@ -4,7 +4,6 @@#include <linux/delay.h> #include <linux/extcon-provider.h> #include <linux/gpio/consumer.h> -#include <linux/gpio/consumer.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/io.h>
drivers/phy/ti/phy-j721e-wiz.c +0 -1
@@ -12,7 +12,6 @@#include <linux/clk.h> #include <linux/clk-provider.h> #include <linux/gpio/consumer.h> -#include <linux/gpio/consumer.h> #include <linux/io.h> #include <linux/module.h> #include <linux/mfd/syscon.h>
include/linux/mfd/ti-lmu.h +0 -1
@@ -10,7 +10,6 @@#ifndef __MFD_TI_LMU_H__#define __MFD_TI_LMU_H__ -#include <linux/gpio/consumer.h> #include <linux/notifier.h> #include <linux/regmap.h> #include <linux/gpio/consumer.h>
sound/soc/codecs/cs42l84.c +0 -1
@@ -16,7 +16,6 @@#include <linux/init.h> #include <linux/delay.h> #include <linux/i2c.h> -#include <linux/gpio/consumer.h> #include <linux/regmap.h> #include <linux/slab.h> #include <linux/acpi.h>
sound/soc/codecs/dmic.c +0 -1
@@ -7,7 +7,6 @@#include <linux/delay.h> #include <linux/gpio/consumer.h> -#include <linux/gpio/consumer.h> #include <linux/platform_device.h> #include <linux/regulator/consumer.h> #include <linux/slab.h>
Quoted 11 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The
linux/gpio.hheader used to be the global definition for the gpio interfaces, with 1100 users back in linux-3.17. In linux-7.2, only about 130 of those remain, so this series cleans out the rest.In each subsystem, we can replace the header either with
linux/gpio/consumer.hfor users of the modern gpio descriptor interface, orlinux/gpio/legacy.hfor the few remaining users of the old number based interface.
Quoted 8 lines
All patches in this series can get applied independently, so my preference would be for each subsystem maintainer to apply these directly, with the rest going into the gpio tree at some point.
The final patch here obviously needs to wait for all the others to get merged first.
Arnd
Thanks for doing this Arnd!
For the series:
[email protected]
AI reviewRe: [PATCH 05/13] mfd: replace linux/gpio.h inclusions
In reply to Arnd BergmannThank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The patch introduces a duplicate `#include <linux/gpio/consumer.h>` in…
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The patch introduces a duplicate #include <linux/gpio/consumer.h> in include/linux/mfd/ti-lmu.h. --
commit 19751af1f4af7549cf9f140e38427847c8babbd4
Author: Arnd Bergmann <[email protected]>
mfd: replace linux/gpio.h inclusions
This commit replaces the deprecated linux/gpio.h inclusion across various MFD drivers and headers, converting them to use either linux/gpio/consumer.h or linux/gpio/legacy.h as needed.
[ ... ]
include/linux/mfd/ti-lmu.h line 16
Quoted 13 lines
include/linux/mfd/ti-lmu.h +1
-1@@ -10,7 +10,7 @@#ifndef __MFD_TI_LMU_H__#define __MFD_TI_LMU_H__ -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/notifier.h> #include <linux/regmap.h> #include <linux/gpio/consumer.h>
[Severity: Low]
This isn't a bug, but <linux/gpio/consumer.h> is now included twice. Would it be better to just drop the replaced include here since the consumer header is already present a few lines below?
[ ... ]
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=5
[email protected]
AI reviewRe: [PATCH 07/13] ASoC: replace linux/gpio.h inclusions
In reply to Arnd BergmannThank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The patch introduces duplicate `#include <linux/gpio/consumer.h>` directives in `cs42l84.c` and…
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The patch introduces duplicate #include <linux/gpio/consumer.h> directives in cs42l84.c and dmic.c. --
commit 5e88ad9a5863dbafbe414c688b31a85827de20da
Author: Arnd Bergmann <[email protected]>
ASoC: replace linux/gpio.h inclusions
This commit updates multiple ASoC codecs to use linux/gpio/consumer.h instead of the deprecated linux/gpio.h header.
sound/soc/codecs/cs42l84.c line 19
Quoted 10 lines
sound/soc/codecs/cs42l84.c +1
-1@@ -16,7 +16,7 @@#include <linux/init.h> #include <linux/delay.h> #include <linux/i2c.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h>
[Severity: Low]
This isn't a bug, but does this create a duplicate include? It appears linux/gpio/consumer.h is already included further down in this file. Could we simply drop the linux/gpio.h include entirely?
Quoted 3 lines
sound/soc/codecs/cs42l84.c +0
-0#include <linux/regmap.h> #include <linux/slab.h> #include <linux/acpi.h>
[ ... ]
sound/soc/codecs/dmic.c line 10
Quoted 11 lines
sound/soc/codecs/dmic.c +1
-1@@ -6,7 +6,7 @@*/ #include <linux/delay.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/gpio/consumer.h>
[Severity: Low]
This isn't a bug, but should we just delete the old include line? Replacing it leaves two identical includes back-to-back.
Quoted 2 lines
sound/soc/codecs/dmic.c +0
-0#include <linux/platform_device.h> #include <linux/regulator/consumer.h>
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=7
[email protected]
AI reviewRe: [PATCH 08/13] pcmcia: replace linux/gpio.h inclusions
In reply to Arnd BergmannThank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Invalid resource cleanup on error path leading to potential double-free of a devres-managed GPIO descriptor. --
commit a1a20647914d78d6a15655dea889e9d53c734136
Author: Arnd Bergmann <[email protected]>
pcmcia: replace linux/gpio.h inclusions
The pcmcia drivers all use the legacy interfaces, so convert to include linux/gpio/legacy.h instead.
[ ... ]
drivers/pcmcia/sa1100_h3600.c line 14
Quoted 10 lines
drivers/pcmcia/sa1100_h3600.c +1
-1@@ -11,7 +11,7 @@#include <linux/interrupt.h> #include <linux/init.h> #include <linux/delay.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h>
[Severity: High]
This isn't a bug introduced by this patch, but I noticed a pre-existing issue while reviewing the GPIO include changes.
Does the error path in h3600_pcmcia_hw_init() cause a double-free of a devres-managed GPIO descriptor?
If gpio_request(H3XXX_EGPIO_OPT_NVRAM_ON) or subsequent legacy GPIO requests fail, the code jumps to or falls through to the err01 label:
drivers/pcmcia/sa1100_h3600.c:h3600_pcmcia_hw_init() {
...
err06: gpio_free(H3XXX_EGPIO_CARD_RESET);
err05: gpio_free(H3XXX_EGPIO_OPT_RESET);
err04: gpio_free(H3XXX_EGPIO_OPT_ON);
err03: gpio_free(H3XXX_EGPIO_OPT_NVRAM_ON);
err01: gpio_free(H3XXX_GPIO_PCMCIA_IRQ0);
return err;
}The err01 label incorrectly frees H3XXX_GPIO_PCMCIA_IRQ0. This GPIO is managed by devres and was not explicitly requested using gpio_request() in this function.
When devres cleans up the failed probe, it will attempt to free the GPIO again. This could lead to a double-free, gpiolib state corruption, kernel warnings, or accidentally freeing a GPIO acquired by a concurrent driver.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=8
[email protected]
AI reviewRe: [PATCH 11/13] Input: matrix_keyboard - replace linux/gpio.h inclusion
In reply to Arnd BergmannThank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Redundant header inclusion of <linux/gpio/consumer.h> --
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Redundant header inclusion of <linux/gpio/consumer.h>
--
commit b60f4c5bf1d6c83cc34b3ab6030725489bd7c3e5
Author: Arnd Bergmann <[email protected]>
Input: matrix_keyboard - replace linux/gpio.h inclusion
This commit replaces the inclusion of the deprecated linux/gpio.h header with linux/gpio/consumer.h in the matrix keypad driver. It prepares the code for the removal of linux/gpio.h.
drivers/input/keyboard/matrix_keypad.c line 19
Quoted 10 lines
drivers/input/keyboard/matrix_keypad.c +1
-1@@ -16,7 +16,7 @@#include <linux/interrupt.h> #include <linux/jiffies.h> #include <linux/module.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h>
[Severity: Low]
Does this result in a redundant inclusion? Looking at matrix_keypad.c, <linux/gpio/consumer.h> is already included earlier in the file:
#include <linux/types.h>
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/platform_device.h>
Could the old <linux/gpio.h> inclusion just be removed entirely instead of being replaced?
Quoted 3 lines
drivers/input/keyboard/matrix_keypad.c +0
-0#include <linux/input/matrix_keypad.h> #include <linux/slab.h> #include <linux/of.h>
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=11
[email protected]
AI reviewRe: [PATCH 12/13] gpib: gpio: replace linux/gpio.h inclusion
In reply to Arnd BergmannThank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
New issues:
- [Low] The patch introduces redundant duplicate #include <linux/gpio/consumer.h> statements in multiple files.
Pre-existing issues:
- [High] Missing bounds check on priv->count in bb_DAV_interrupt() can lead to a buffer overflow. --
commit 198cff3fadd8f7ab5db98a0ff2a666f4ac7f1bf0
Author: Arnd Bergmann <[email protected]>
gpib: gpio: replace linux/gpio.h inclusion
linux/gpio.h is going away, so use linux/gpio/consumer.h instead.
drivers/gpib/gpio/gpib_bitbang.c line 67
Quoted 10 lines
drivers/gpib/gpio/gpib_bitbang.c +1
-1@@ -64,7 +64,7 @@#include <linux/gpio/consumer.h> #include <linux/gpio/driver.h> #include <linux/gpio/machine.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h>
[Severity: Low]
This isn't a bug, but does this introduce a duplicate include of linux/gpio/consumer.h? It appears to already be included a few lines above.
Similar duplicate includes might have been added to other files like drivers/input/keyboard/matrix_keypad.c and drivers/net/phy/mdio_device.c if they were also part of this series.
drivers/gpib/gpio/gpib_bitbang.c line 70
Quoted 3 lines
drivers/gpib/gpio/gpib_bitbang.c +0
-0#include <linux/irq.h> static int sn7516x_used =1 , sn7516x;
While reviewing this file, I noticed a separate issue in bb_DAV_interrupt().
[Severity: High]
This is a pre-existing issue, but does this lack of a bounds check on priv->count lead to a buffer overflow?
drivers/gpib/gpio/gpib_bitbang.c:bb_DAV_interrupt() {
...
priv->rbuf[priv->count++] = get_data_lines();
priv->end = !gpiod_get_value(EOI);
...
}If the hardware line DAV goes low multiple times while priv->r_busy is set without waiting for the normal NRFD/NDAC handshake, could priv->count exceed the allocated buffer size and corrupt memory?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=12
[email protected]
AI reviewRe: [PATCH 13/13] gpiolib: remove linux/gpio.h
In reply to Arnd BergmannThank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Low] Removing `include/linux/gpio.h` breaks the build for multiple drivers across the kernel tree that…
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] Removing include/linux/gpio.h breaks the build for multiple drivers across the kernel tree that still include it and rely on it for legacy GPIO declarations.
- [Low] Typographical error in drivers/gpio/TODO where legacy.h is misspelled as lagacy.h.
--
commit eb8b9c8709d4fc96f518f3578deb6f0d05993604
Author: Arnd Bergmann <[email protected]>
gpiolib: remove linux/gpio.h
This commit removes the include/linux/gpio.h header entirely, cleaning up leftover bits under the assumption that all drivers have been converted to consumer.h or legacy.h. It also updates internal gpiolib includes and a TODO file accordingly.
drivers/gpio/TODO Work items: · line 55
Quoted 12 lines
drivers/gpio/TODO +1
-3@@ -52,9 +52,7 @@ Work items: base can be made dynamic (set to -1) if CONFIG_GPIO_SYSFS is disabled. - When this work is complete (will require some of the items in the - following ongoing work as well) we can delete the old global - numberspace accessors from <linux/gpio.h> and eventually delete - <linux/gpio.h> altogether. + following ongoing work as well) we can delete <linux/gpio/lagacy.h>.
^^^^^^^^
[Severity: Low]
This isn't a bug, but there is a typo here (lagacy.h instead of legacy.h).
[ ... ]
Quoted 6 lines
include/linux/gpio.h deleted +0
-0@@ -1,22 +0,0 @@
[ ... ]
include/linux/gpio.h line 22
Quoted 5 lines
include/linux/gpio.h deleted +0
-5-#ifdef CONFIG_GPIOLIB_LEGACY -#include <linux/gpio/legacy.h> -#endif /* CONFIG_GPIOLIB_LEGACY */ - -#endif /* __LINUX_GPIO_H */
[Severity: Low]
Does removing this header break the build for remaining unconverted legacy GPIO consumers?
For example, drivers/input/keyboard/gpio_keys.c:gpio_keys_setup_key() still appears to rely on this header for devm_gpio_request_one():
error = devm_gpio_request_one(dev, button->gpio, GPIOF_IN, desc);
Similarly, drivers/leds/leds-gpio.c:gpio_led_get_gpiod() also relies on it:
ret = devm_gpio_request_one(dev, template->gpio, GPIOF_OUT_INIT_LOW,
template->name);And arch/x86/platform/olpc/olpc-xo1-sci.c:setup_ec_sci() still uses gpio_request():
r = gpio_request(OLPC_GPIO_ECSCI, "OLPC-ECSCI");
Will these drivers fail to compile since functions like devm_gpio_request_one() and gpio_request() will now be missing or implicitly declared?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=13
[email protected]
AI reviewRe: [PATCH 06/13] [net-next] net: replace linux/gpio.h inclusions
In reply to Arnd BergmannThank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Duplicate inclusion of `<linux/gpio/consumer.h>` caused by an unchecked find-and-replace. --
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Duplicate inclusion of <linux/gpio/consumer.h> caused by an unchecked find-and-replace. --
commit cb55ce48e23e6753d04ac5f664585feb999f1fcd
Author: Arnd Bergmann <[email protected]>
net: replace linux/gpio.h inclusions
This commit replaces obsolete linux/gpio.h includes with linux/gpio/consumer.h or linux/gpio/legacy.h across various network drivers where possible.
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c line 19
Quoted 10 lines
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +1
-1@@ -16,7 +16,7 @@#include <linux/net_tstamp.h> #include <linux/ptp_classify.h> #include <linux/ptp_pch.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h>
[Severity: Low]
Does this create a duplicate include in pch_gbe_main.c?
Since linux/gpio/consumer.h is already included earlier in the file alongside linux/gpio/machine.h, changing this include results in it being included twice. Can this replaced include simply be removed?
Quoted 2 lines
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +0
-0#define PCH_GBE_MAR_ENTRIES 16
[ ... ]
drivers/net/phy/mdio_device.c line 12
Quoted 11 lines
drivers/net/phy/mdio_device.c +1
-1@@ -8,7 +8,7 @@#include <linux/delay.h> #include <linux/errno.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/gpio/consumer.h>
[Severity: Low]
Did the automated replacement result in consecutive duplicate includes here?
It looks like mdio_device.c already included linux/gpio/consumer.h right below the old linux/gpio.h include. Should we just drop the old include entirely instead of replacing it?
Quoted 2 lines
drivers/net/phy/mdio_device.c +0
-0#include <linux/init.h> #include <linux/interrupt.h>
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=6
[email protected]
AI reviewRe: [PATCH 09/13] phy: replace linux/gpio.h inclusions
In reply to Arnd BergmannThank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Replacing `#include <linux/gpio.h>` with `#include <linux/gpio/consumer.h>` results in duplicate…
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Replacing #include <linux/gpio.h> with #include <linux/gpio/consumer.h> results in duplicate include directives. --
commit 172e670e08c06c1b704f9f5d80187a66ba9bb20c
Author: Arnd Bergmann <[email protected]>
phy: replace linux/gpio.h inclusions
linux/gpio.h should no longer be used, convert these instead to either linux/gpio/consumer.h or linux/gpio/legacy.h as needed.
drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c line 7
Quoted 11 lines
drivers/phy/broadcom/phy-bcm-ns2-usbdrd.c +1
-1@@ -3,7 +3,7 @@#include <linux/delay.h> #include <linux/extcon-provider.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/gpio/consumer.h>
[Severity: Low]
This isn't a bug, but the replacement leaves us with consecutive duplicate linux/gpio/consumer.h inclusions. Could the redundant include be removed?
[ ... ]
drivers/phy/ti/phy-j721e-wiz.c line 15
Quoted 11 lines
drivers/phy/ti/phy-j721e-wiz.c +1
-1@@ -11,7 +11,7 @@#include <linux/slab.h> #include <linux/clk.h> #include <linux/clk-provider.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/gpio/consumer.h>
[Severity: Low]
This isn't a bug, but similar to the broadcom phy driver, this creates duplicate linux/gpio/consumer.h inclusions here as well. Should the second one be dropped?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=9
Re: [PATCH 13/13] gpiolib: remove linux/gpio.h
In reply to [email protected]Quoted 8 lines · On Tue, Jun 30, 2026, at 15:28, [email protected] wrote:
drivers/gpio/TODO Work items: · line 55
Quoted 5 lines
- When this work is complete (will require some of the items in the
drivers/gpio/TODO +1
-3- following ongoing work as well) we can delete the old global - numberspace accessors from <linux/gpio.h> and eventually delete - <linux/gpio.h> altogether. + following ongoing work as well) we can delete <linux/gpio/lagacy.h>.^^^^^^^^[Severity: Low]
This isn't a bug, but there is a typo here (lagacy.hinstead oflegacy.h).
Fixed now for v2.
Quoted 9 lines
include/linux/gpio.h line 22
Quoted 5 lines
include/linux/gpio.h deleted +0
-5-#ifdef CONFIG_GPIOLIB_LEGACY -#include <linux/gpio/legacy.h> -#endif /* CONFIG_GPIOLIB_LEGACY */ - -#endif /* __LINUX_GPIO_H */ [Severity: Low]
Does removing this header break the build for remaining unconverted legacy GPIO consumers?
There are a few more patches in flight that all have to be applied before this one.
Arnd
Re: [PATCH 08/13] pcmcia: replace linux/gpio.h inclusions
In reply to [email protected]Quoted 6 lines · On Tue, Jun 30, 2026, at 15:28, [email protected] wrote:
[Severity: High]
This isn't a bug introduced by this patch, but I noticed a pre-existing issue while reviewing the GPIO include changes.Does the error path in
h3600_pcmcia_hw_init()cause a double-free of a devres-managed GPIO descriptor?
Yes, there are many bugs in the old pcmcia drivers. I expect that we will remove these soon, as I plan to drop all the sa1100 and pxa board files early next year.
Arnd
Re: [PATCH 09/13] phy: replace linux/gpio.h inclusions
In reply to [email protected]Quoted 4 lines · On Tue, Jun 30, 2026, at 15:28, [email protected] wrote:
[Severity: Low]
This isn't a bug, but the replacement leaves us with consecutive duplicatelinux/gpio/consumer.hinclusions. Could the redundant include be removed?
This was already reported and fixed earlier, all of these will be addressed in v2.
Arnd
Quoted 11 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The
linux/gpio.hheader used to be the global definition for the gpio interfaces, with 1100 users back in linux-3.17. In linux-7.2, only about 130 of those remain, so this series cleans out the rest.In each subsystem, we can replace the header either with
linux/gpio/consumer.hfor users of the modern gpio descriptor interface, orlinux/gpio/legacy.hfor the few remaining users of the old number based interface.
Quoted 6 lines
All patches in this series can get applied independently, so my preference would be for each subsystem maintainer to apply these directly, with the rest going into the gpio tree at some point.
The final patch here obviously needs to wait for all the others to get merged first.
This is helpful.
The series:
Yours,
Linus Walleij
Re: [PATCH 03/13] mips: replace linux/gpio.h inclusions
In reply to Arnd BergmannQuoted 6 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
linux/gpio.hshould no longer be used, convert these instead to eitherlinux/gpio/consumer.horlinux/gpio/legacy.has needed.Signed-off-by Arnd Bergmann <[email protected]>
Quoted 10 lines
--- arch/mips/alchemy/board-xxs1500.c | 2 +- arch/mips/alchemy/devboards/db1000.c | 2 +- arch/mips/alchemy/devboards/db1200.c | 2 +- arch/mips/alchemy/devboards/db1550.c | 2 +- arch/mips/bcm47xx/workarounds.c | 2 +- arch/mips/bcm63xx/boards/board_bcm963xx.c | 1 + arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 2 +- arch/mips/txx9/rbtx4927/setup.c | 2 +- 8 files changed, 8 insertions(+), 7 deletions(-)
Re: [PATCH 04/13] sh: replace linux/gpio.h inclusions
In reply to Arnd BergmannQuoted 16 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
linux/gpio.hshould no longer be used, convert these instead tolinux/gpio/legacy.hfor the sh boards using the legacy interfaces, or remove it where it is not needed at all.Signed-off-by Arnd Bergmann <[email protected]>--- arch/sh/boards/board-magicpanelr2.c | 2 +- arch/sh/boards/board-sh7757lcr.c | 2 +- arch/sh/boards/board-urquell.c | 2 +- arch/sh/boards/mach-ap325rxa/setup.c | 2 +- arch/sh/boards/mach-ecovec24/setup.c | 2 +- arch/sh/boards/mach-highlander/pinmux-r7785rp.c | 2 +- arch/sh/boards/mach-kfr2r09/lcd_wqvga.c | 2 +- arch/sh/boards/mach-kfr2r09/setup.c | 2 +-
Quoted 8 lines
arch/sh/boards/mach-migor/lcd_qvga.c | 2 +- arch/sh/boards/mach-migor/setup.c | 2 +- arch/sh/boards/mach-rsk/devices-rsk7203.c | 2 +- arch/sh/boards/mach-rsk/devices-rsk7269.c | 1 - arch/sh/boards/mach-se/7724/setup.c | 2 +- arch/sh/include/mach-common/mach/magicpanelr2.h | 2 -- arch/sh/kernel/cpu/sh4a/setup-shx3.c | 2 +- 15 files changed, 13 insertions(+), 16 deletions(-)
Re: [PATCH 13/13] gpiolib: remove linux/gpio.h
In reply to Arnd BergmannQuoted 14 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
After all other drivers have converted to
linux/gpio/consumer.horlinux/gpio/legacy.h, remove the final leftover bits here.Signed-off-by Arnd Bergmann <[email protected]>--- MAINTAINERS | 1 - drivers/gpio/TODO | 4 +--- drivers/gpio/gpiolib-cdev.c | 2 +- drivers/gpio/gpiolib-legacy.c | 3 +-- drivers/gpio/gpiolib.c | 2 +- include/linux/gpio.h | 22 ---------------------- 6 files changed, 4 insertions(+), 30 deletions(-)
Quoted 1 line
delete mode 100644
include/linux/gpio.h
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 6 lines · On Mon, 29 Jun 2026 15:26:20 +0200 you wrote:
From: Arnd Bergmann <[email protected]>
The
linux/gpio.hheader used to be the global definition for the gpio interfaces, with 1100 users back in linux-3.17. In linux-7.2, only about 130 of those remain, so this series cleans out the rest.
Quoted 6 lines
In each subsystem, we can replace the header either with
linux/gpio/consumer.hfor users of the modern gpio descriptor interface, orlinux/gpio/legacy.hfor the few remaining users of the old number based interface.[...]
Here is the summary with links:
- [01/13] ARM: replace linux/gpio.h inclusions (no matching commit)
- [02/13] m68k/coldfire: replace linux/gpio.h inclusions (no matching commit)
- [03/13] mips: replace linux/gpio.h inclusions (no matching commit)
- [04/13] sh: replace linux/gpio.h inclusions (no matching commit)
- [05/13] mfd: replace linux/gpio.h inclusions (no matching commit)
- [06/13,net-next] net: replace linux/gpio.h inclusions
https://git.kernel.org/netdev/net-next/c/a53d1872f2be
- [07/13] ASoC: replace linux/gpio.h inclusions
(no matching commit)
- [08/13] pcmcia: replace linux/gpio.h inclusions
(no matching commit)
- [09/13] phy: replace linux/gpio.h inclusions
(no matching commit)
- [10/13] media: replace linux/gpio.h inclusions
(no matching commit)
- [11/13] Input: matrix_keyboard - replace linux/gpio.h inclusion (no matching commit)
- [12/13] gpib: gpio: replace linux/gpio.h inclusion (no matching commit)
- [13/13] gpiolib: remove linux/gpio.h
(no matching commit)
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Re: [PATCH 05/13] mfd: replace linux/gpio.h inclusions
In reply to Arnd BergmannQuoted 9 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
linux/gpio.hshould no longer be used, convert these instead to eitherlinux/gpio/consumer.horlinux/gpio/legacy.has needed.Signed-off-by Arnd Bergmann <[email protected]>--- drivers/mfd/arizona-irq.c | 2 +- drivers/mfd/wm8994-irq.c | 2 +-
For the wolfson bits:
Thanks,
Charles
Re: [PATCH 07/13] ASoC: replace linux/gpio.h inclusions
In reply to Arnd BergmannQuoted 8 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
linux/gpio.his going away,s o uselinux/gpio/consumer.hinstead.Signed-off-by Arnd Bergmann <[email protected]>--- sound/soc/codecs/cs42l84.c | 2 +- sound/soc/codecs/cx2072x.c | 2 +-
For the Cirrus bits:
Thanks,
Charles
Signature · 3 lines
linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
Re: [PATCH 02/13] m68k/coldfire: replace linux/gpio.h inclusions
In reply to Arnd BergmannHi Arnd,
Quoted 6 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
linux/gpio.hshould no longer be used, convert these instead tolinux/gpio/legacy.hfor coldfire.Signed-off-by Arnd Bergmann <[email protected]>
For the ColdFire changes, LGTM:
Regards
Greg
Quoted 31 lines
--- arch/m68k/coldfire/device.c | 2 +- arch/m68k/include/asm/mcfgpio.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)arch/m68k/coldfire/device.c +1
-1@@ -12,7 +12,7 @@#include <linux/init.h> #include <linux/io.h> #include <linux/spi/spi.h> -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #include <linux/fec.h> #include <linux/dmaengine.h> #include <asm/traps.h> arch/m68k/include/asm/mcfgpio.h +1
-1@@ -16,7 +16,7 @@ int __mcfgpio_request(unsigned gpio);void __mcfgpio_free (unsigned gpio);#ifdef CONFIG_GPIOLIB -#include <linux/gpio.h> +#include <linux/gpio/legacy.h> #else /* our alternate 'gpiolib' functions */