mtd: Explicitly include correct DT includes
Subsystems (22)
PATCH 1/1 mtd: Explicitly include correct DT includes
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes.
--- drivers/mtd/devices/mchp23k256.c | 2 +- drivers/mtd/devices/mchp48l640.c | 2 +- drivers/mtd/devices/mtd_dataflash.c | 1 - drivers/mtd/maps/physmap-bt1-rom.c | 1 - drivers/mtd/maps/physmap-gemini.c | 2 +- drivers/mtd/maps/physmap-ixp4xx.c | 2 +- drivers/mtd/maps/physmap-ixp4xx.h | 1 + drivers/mtd/maps/physmap-versatile.c | 2 +- drivers/mtd/maps/sun_uflash.c | 2 +- drivers/mtd/nand/ecc-mxic.c | 2 +- drivers/mtd/nand/ecc.c | 2 +- drivers/mtd/nand/onenand/onenand_omap2.c | 2 +- drivers/mtd/nand/raw/ams-delta.c | 2 +- drivers/mtd/nand/raw/davinci_nand.c | 1 - drivers/mtd/nand/raw/denali_dt.c | 1 - drivers/mtd/nand/raw/fsl_ifc_nand.c | 1 + drivers/mtd/nand/raw/fsl_upm.c | 3 ++- drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 2 +- drivers/mtd/nand/raw/ingenic/ingenic_ecc.c | 1 + drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c | 1 - drivers/mtd/nand/raw/marvell_nand.c | 3 ++- drivers/mtd/nand/raw/meson_nand.c | 1 - drivers/mtd/nand/raw/mpc5121_nfc.c | 4 ++-- drivers/mtd/nand/raw/mtk_nand.c | 1 - drivers/mtd/nand/raw/mxc_nand.c | 1 - drivers/mtd/nand/raw/ndfc.c | 3 ++- drivers/mtd/nand/raw/omap2.c | 2 +- drivers/mtd/nand/raw/pl35x-nand-controller.c | 4 +--- drivers/mtd/nand/raw/qcom_nandc.c | 2 +- drivers/mtd/nand/raw/rockchip-nand-controller.c | 1 - drivers/mtd/nand/raw/s3c2410.c | 1 - drivers/mtd/nand/raw/sh_flctl.c | 1 - drivers/mtd/nand/raw/socrates_nand.c | 3 ++- drivers/mtd/nand/raw/sunxi_nand.c | 1 - drivers/mtd/nand/raw/xway_nand.c | 3 ++- drivers/mtd/spi-nor/controllers/nxp-spifi.c | 1 - 36 files changed, 29 insertions(+), 36 deletions(-)
drivers/mtd/devices/mchp23k256.c +1 -1
@@ -15,7 +15,7 @@#include <linux/sizes.h> #include <linux/spi/flash.h> #include <linux/spi/spi.h> -#include <linux/of_device.h> +#include <linux/of.h> #define MAX_CMD_SIZE 4
drivers/mtd/devices/mchp48l640.c +1 -1
@@ -22,7 +22,7 @@#include <linux/sizes.h> #include <linux/spi/flash.h> #include <linux/spi/spi.h> -#include <linux/of_device.h> +#include <linux/of.h> struct mchp48_caps {unsigned int size;
drivers/mtd/devices/mtd_dataflash.c +0 -1
@@ -13,7 +13,6 @@#include <linux/err.h> #include <linux/math64.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/spi/spi.h> #include <linux/spi/flash.h>
drivers/mtd/maps/physmap-bt1-rom.c +0 -1
@@ -14,7 +14,6 @@#include <linux/mtd/xip.h> #include <linux/mux/consumer.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/string.h> #include <linux/types.h>
drivers/mtd/maps/physmap-gemini.c +1 -1
@@ -8,10 +8,10 @@*/ #include <linux/export.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/mtd/map.h> #include <linux/mtd/xip.h> #include <linux/mfd/syscon.h> +#include <linux/platform_device.h> #include <linux/regmap.h> #include <linux/bitops.h> #include <linux/pinctrl/consumer.h>
drivers/mtd/maps/physmap-ixp4xx.c +1 -1
@@ -11,7 +11,7 @@*/ #include <linux/export.h> #include <linux/of.h> -#include <linux/of_device.h> +#include <linux/platform_device.h> #include <linux/mtd/map.h> #include <linux/mtd/xip.h> #include "physmap-ixp4xx.h"
drivers/mtd/maps/physmap-ixp4xx.h +1 -0
@@ -1,5 +1,6 @@/* SPDX-License-Identifier: GPL-2.0 */ #include <linux/of.h> +#include <linux/platform_device.h> #include <linux/mtd/map.h> #ifdef CONFIG_MTD_PHYSMAP_IXP4XX
drivers/mtd/maps/physmap-versatile.c +1 -1
@@ -9,9 +9,9 @@#include <linux/io.h> #include <linux/of.h> #include <linux/of_address.h> -#include <linux/of_device.h> #include <linux/mtd/map.h> #include <linux/mfd/syscon.h> +#include <linux/platform_device.h> #include <linux/regmap.h> #include <linux/bitops.h> #include "physmap-versatile.h"
drivers/mtd/maps/sun_uflash.c +1 -1
@@ -14,7 +14,7 @@#include <linux/errno.h> #include <linux/ioport.h> #include <linux/of.h> -#include <linux/of_device.h> +#include <linux/platform_device.h> #include <linux/slab.h> #include <asm/prom.h> #include <linux/uaccess.h>
drivers/mtd/nand/ecc-mxic.c +1 -1
@@ -18,7 +18,7 @@#include <linux/mtd/nand.h> #include <linux/mtd/nand-ecc-mxic.h> #include <linux/mutex.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <linux/of_platform.h> #include <linux/platform_device.h> #include <linux/slab.h>
drivers/mtd/nand/ecc.c +1 -1
@@ -95,9 +95,9 @@#include <linux/module.h> #include <linux/mtd/nand.h> +#include <linux/platform_device.h> #include <linux/slab.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/of_platform.h> static LIST_HEAD (on_host_hw_engines);
drivers/mtd/nand/onenand/onenand_omap2.c +1 -1
@@ -13,7 +13,7 @@#include <linux/mtd/mtd.h> #include <linux/mtd/onenand.h> #include <linux/mtd/partitions.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <linux/omap-gpmc.h> #include <linux/platform_device.h> #include <linux/interrupt.h>
drivers/mtd/nand/raw/ams-delta.c +1 -1
@@ -22,7 +22,7 @@#include <linux/mtd/nand-gpio.h> #include <linux/mtd/rawnand.h> #include <linux/mtd/partitions.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/sizes.h>
drivers/mtd/nand/raw/davinci_nand.c +0 -1
@@ -18,7 +18,6 @@#include <linux/mtd/rawnand.h> #include <linux/mtd/partitions.h> #include <linux/slab.h> -#include <linux/of_device.h> #include <linux/of.h> #include <linux/platform_data/mtd-davinci.h>
drivers/mtd/nand/raw/denali_dt.c +0 -1
@@ -13,7 +13,6 @@#include <linux/kernel.h> #include <linux/module.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/reset.h>
drivers/mtd/nand/raw/fsl_ifc_nand.c +1 -0
@@ -8,6 +8,7 @@*/ #include <linux/module.h> +#include <linux/platform_device.h> #include <linux/types.h> #include <linux/kernel.h> #include <linux/of_address.h>
drivers/mtd/nand/raw/fsl_upm.c +2 -1
@@ -13,7 +13,8 @@#include <linux/mtd/rawnand.h> #include <linux/mtd/partitions.h> #include <linux/mtd/mtd.h> -#include <linux/of_platform.h> +#include <linux/of.h> +#include <linux/platform_device.h> #include <linux/io.h> #include <linux/slab.h> #include <asm/fsl_lbc.h>
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c +1 -1
@@ -13,7 +13,7 @@#include <linux/module.h> #include <linux/mtd/partitions.h> #include <linux/of.h> -#include <linux/of_device.h> +#include <linux/platform_device.h> #include <linux/pm_runtime.h> #include <linux/dma/mxs-dma.h> #include "gpmi-nand.h"
drivers/mtd/nand/raw/ingenic/ingenic_ecc.c +1 -0
@@ -9,6 +9,7 @@#include <linux/clk.h> #include <linux/init.h> #include <linux/module.h> +#include <linux/of.h> #include <linux/of_platform.h> #include <linux/platform_device.h>
drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c +0 -1
@@ -13,7 +13,6 @@#include <linux/module.h> #include <linux/of.h> #include <linux/of_address.h> -#include <linux/of_device.h> #include <linux/gpio/consumer.h> #include <linux/platform_device.h> #include <linux/slab.h>
drivers/mtd/nand/raw/marvell_nand.c +2 -1
@@ -77,9 +77,10 @@#include <linux/module.h> #include <linux/clk.h> #include <linux/mtd/rawnand.h> -#include <linux/of_platform.h> +#include <linux/of.h> #include <linux/iopoll.h> #include <linux/interrupt.h> +#include <linux/platform_device.h> #include <linux/slab.h> #include <linux/mfd/syscon.h> #include <linux/regmap.h>
drivers/mtd/nand/raw/meson_nand.c +0 -1
@@ -19,7 +19,6 @@#include <linux/module.h> #include <linux/iopoll.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/sched/task_stack.h> #define NFC_REG_CMD 0x00
drivers/mtd/nand/raw/mpc5121_nfc.c +2 -2
@@ -21,10 +21,10 @@#include <linux/mtd/mtd.h> #include <linux/mtd/rawnand.h> #include <linux/mtd/partitions.h> +#include <linux/of.h> #include <linux/of_address.h> -#include <linux/of_device.h> #include <linux/of_irq.h> -#include <linux/of_platform.h> +#include <linux/platform_device.h> #include <asm/mpc5121.h>
drivers/mtd/nand/raw/mtk_nand.c +0 -1
@@ -16,7 +16,6 @@#include <linux/module.h> #include <linux/iopoll.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/mtd/nand-ecc-mtk.h> /* NAND controller register definition */
drivers/mtd/nand/raw/mxc_nand.c +0 -1
@@ -20,7 +20,6 @@#include <linux/irq.h> #include <linux/completion.h> #include <linux/of.h> -#include <linux/of_device.h> #define DRIVER_NAME "mxc_nand"
drivers/mtd/nand/raw/ndfc.c +2 -1
@@ -22,8 +22,9 @@#include <linux/mtd/ndfc.h> #include <linux/slab.h> #include <linux/mtd/mtd.h> +#include <linux/of.h> #include <linux/of_address.h> -#include <linux/of_platform.h> +#include <linux/platform_device.h> #include <asm/io.h> #define NDFC_MAX_CS 4
drivers/mtd/nand/raw/omap2.c +1 -1
@@ -22,7 +22,7 @@#include <linux/iopoll.h> #include <linux/slab.h> #include <linux/of.h> -#include <linux/of_device.h> +#include <linux/of_platform.h> #include <linux/platform_data/elm.h>
drivers/mtd/nand/raw/pl35x-nand-controller.c +1 -3
@@ -23,9 +23,7 @@#include <linux/mtd/mtd.h> #include <linux/mtd/rawnand.h> #include <linux/mtd/partitions.h> -#include <linux/of_address.h> -#include <linux/of_device.h> -#include <linux/of_platform.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/slab.h> #include <linux/clk.h>
drivers/mtd/nand/raw/qcom_nandc.c +1 -1
@@ -3,6 +3,7 @@* Copyright (c) 2016, The Linux Foundation. All rights reserved. */ #include <linux/clk.h> +#include <linux/platform_device.h> #include <linux/slab.h> #include <linux/bitops.h> #include <linux/dma/qcom_adm.h>
@@ -12,7 +13,6 @@#include <linux/mtd/rawnand.h> #include <linux/mtd/partitions.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/delay.h> #include <linux/dma/qcom_bam_dma.h>
drivers/mtd/nand/raw/rockchip-nand-controller.c +0 -1
@@ -15,7 +15,6 @@#include <linux/mtd/mtd.h> #include <linux/mtd/rawnand.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/slab.h>
drivers/mtd/nand/raw/s3c2410.c +0 -1
@@ -26,7 +26,6 @@#include <linux/clk.h> #include <linux/cpufreq.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/mtd/mtd.h> #include <linux/mtd/rawnand.h>
drivers/mtd/nand/raw/sh_flctl.c +0 -1
@@ -17,7 +17,6 @@#include <linux/interrupt.h> #include <linux/io.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/pm_runtime.h> #include <linux/sh_dma.h>
drivers/mtd/nand/raw/socrates_nand.c +2 -1
@@ -8,8 +8,9 @@#include <linux/mtd/mtd.h> #include <linux/mtd/rawnand.h> #include <linux/mtd/partitions.h> +#include <linux/of.h> #include <linux/of_address.h> -#include <linux/of_platform.h> +#include <linux/platform_device.h> #include <linux/io.h> #define FPGA_NAND_CMD_MASK (0x7 << 28)
drivers/mtd/nand/raw/sunxi_nand.c +0 -1
@@ -19,7 +19,6 @@#include <linux/moduleparam.h> #include <linux/platform_device.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/mtd/mtd.h> #include <linux/mtd/rawnand.h> #include <linux/mtd/partitions.h>
drivers/mtd/nand/raw/xway_nand.c +2 -1
@@ -7,7 +7,8 @@#include <linux/mtd/rawnand.h> #include <linux/of_gpio.h> -#include <linux/of_platform.h> +#include <linux/of.h> +#include <linux/platform_device.h> #include <lantiq_soc.h>
drivers/mtd/spi-nor/controllers/nxp-spifi.c +0 -1
@@ -17,7 +17,6 @@#include <linux/mtd/partitions.h> #include <linux/mtd/spi-nor.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/spi/spi.h>
Signature · 1 line
2.40.1
Miquel Raynal
maintainerHi Rob,
[email protected] wrote on Fri, 14 Jul 2023 11:47:49 -0600:
Quoted 2 lines
The DT
of_device.handof_platform.hdate back to the separateof_platform_bus_typebefore it as merged into the regular platform bus.
was?
Otherwise LGTM, I will fix it when applying.
Quoted 8 lines
As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include
platform_device.handof.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes.Signed-off-by Rob Herring <[email protected]>
Thanks,
Miquèl
Quoted 10 lines · Rob Herring
The DT
of_device.handof_platform.hdate back to the separateof_platform_bus_typebefore it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also includeplatform_device.handof.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes.Signed-off-by Rob Herring <[email protected]>
Thanks for going back and fixing up this!
Yours,
Linus Walleij
Am Freitag, 14. Juli 2023, 19:47:49 CEST schrieb Rob Herring:
Quoted 9 lines
The DT
of_device.handof_platform.hdate back to the separateof_platform_bus_typebefore it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also includeplatform_device.handof.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes.
Quoted 4 lines
Signed-off-by Rob Herring <[email protected]>---
drivers/mtd/nand/raw/rockchip-nand-controller.c | 1 -
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 9 lines · Rob Herring
The DT
of_device.handof_platform.hdate back to the separateof_platform_bus_typebefore it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also includeplatform_device.handof.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes.
Quoted 3 lines
Signed-off-by Rob Herring <[email protected]>Reviewed-by Linus Walleij <[email protected]>Acked-by Heiko Stuebner <[email protected]>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel