mtd: Explicitly include correct DT includes
authorRob Herring <robh@kernel.org>
Fri, 14 Jul 2023 17:47:49 +0000 (11:47 -0600)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 27 Jul 2023 15:03:41 +0000 (17:03 +0200)
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it was 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.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230714174751.4060439-1-robh@kernel.org
36 files changed:
drivers/mtd/devices/mchp23k256.c
drivers/mtd/devices/mchp48l640.c
drivers/mtd/devices/mtd_dataflash.c
drivers/mtd/maps/physmap-bt1-rom.c
drivers/mtd/maps/physmap-gemini.c
drivers/mtd/maps/physmap-ixp4xx.c
drivers/mtd/maps/physmap-ixp4xx.h
drivers/mtd/maps/physmap-versatile.c
drivers/mtd/maps/sun_uflash.c
drivers/mtd/nand/ecc-mxic.c
drivers/mtd/nand/ecc.c
drivers/mtd/nand/onenand/onenand_omap2.c
drivers/mtd/nand/raw/ams-delta.c
drivers/mtd/nand/raw/davinci_nand.c
drivers/mtd/nand/raw/denali_dt.c
drivers/mtd/nand/raw/fsl_ifc_nand.c
drivers/mtd/nand/raw/fsl_upm.c
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
drivers/mtd/nand/raw/ingenic/ingenic_ecc.c
drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c
drivers/mtd/nand/raw/marvell_nand.c
drivers/mtd/nand/raw/meson_nand.c
drivers/mtd/nand/raw/mpc5121_nfc.c
drivers/mtd/nand/raw/mtk_nand.c
drivers/mtd/nand/raw/mxc_nand.c
drivers/mtd/nand/raw/ndfc.c
drivers/mtd/nand/raw/omap2.c
drivers/mtd/nand/raw/pl35x-nand-controller.c
drivers/mtd/nand/raw/qcom_nandc.c
drivers/mtd/nand/raw/rockchip-nand-controller.c
drivers/mtd/nand/raw/s3c2410.c
drivers/mtd/nand/raw/sh_flctl.c
drivers/mtd/nand/raw/socrates_nand.c
drivers/mtd/nand/raw/sunxi_nand.c
drivers/mtd/nand/raw/xway_nand.c
drivers/mtd/spi-nor/controllers/nxp-spifi.c

index 3a6ea7a6a30c3a62c7627084febc892643adca34..d533475fda159315fa22e0c7e89dcd7d328c9f9f 100644 (file)
@@ -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
 
index 40cd5041174c9649c930b9a1985a5fe259f43d5e..f576e6a890e859e7d20aeeb2ede4ca0acf4850fc 100644 (file)
@@ -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;
index 1d3b2a94581f1837d191d292a271baa09526650a..0c1b9330361809d59a3ee534004ef537bc6c40e0 100644 (file)
@@ -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>
index 58782cfaf71cf048a059ed1d6249d2955c41c71b..60dccc48f99e01a04d5c7984f9e8585283772ecc 100644 (file)
@@ -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>
index d4a46e159d38f674bb30b3ffba78fe3941e6afe7..9d3b4bf84a1ad7cb340d916b39a281b46af8dc33 100644 (file)
@@ -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>
index 6a054229a8a0ee81c8a02d021f57e0201f4ec73f..c561468f95f6c3f63e6d288465d098d0863250db 100644 (file)
@@ -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"
index b0fc49b7f3edf05853f093e299c92208658d91b0..46824c57e58a6013660a092a9f46f58e88a3699d 100644 (file)
@@ -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
index a1b8b7b25f88b2a49383b67b7c4e34f4e0d47599..8e15d514c82daf84e066e37feb5534f2357aa829 100644 (file)
@@ -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"
index 860b19f77090277343e9b59e5a0ca9b2318e1652..2bfdf1b7e18a10fff90e8ac3ae9847a2a77624dd 100644 (file)
@@ -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>
index 22a760e6024effa2d7c2a4ce893eaa933d0ab326..47e10945b8d27171b5b316d192da51fb6a6f333c 100644 (file)
@@ -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>
index 5250764cedee155804eb18c44ea5e3d59625ff61..8f996e8d61b86b6a0a72697e8d6e21a34a9d944b 100644 (file)
@@ -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);
index ff7af98604df2cd85ba8aa06dc47df589a1dcbec..7db53b59605d8a24056334829a5e4421c0ebf987 100644 (file)
@@ -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>
index fa621ffa649094435862aa7f54160c47b4a356bb..919816a7aca754987e88f77e76d0666ac6a61fd6 100644 (file)
@@ -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>
 
index 415d6aaa8255a6b488a77742b58e6edbdcf0e4d0..e75d81cf8c211fa6215d5f9b5d8e85effa78928b 100644 (file)
@@ -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>
index 915047e3fbc2e2433e0998e1a05d2af8682aa5de..edac8749bb9391adcea02e285cc2cc3ee9601e7e 100644 (file)
@@ -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>
 
index fa537fee67019baf89af253cf01d84da2cd8e955..20bb1e0cb5ebfde4038a179c17f71cf6ea443d7a 100644 (file)
@@ -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>
index 086426139173f39d832f3bca00ff475eb6106c8e..5bf73efe42e7cd03cb15717ed293875651a416df 100644 (file)
@@ -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>
index 500e7a28d2e417117037aef90409fb5518176791..e71ad2fcec2326dcc5cd93520e4dc54cd3a5133a 100644 (file)
@@ -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"
index 9054559e52dda6c7dd15b3104f09b5133756b75f..525c34c281b65df0aba78168b3eb13260b14b4fb 100644 (file)
@@ -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>
 
index b9f135297aa0b4958c51f033e62e14e7720016cc..6748226b8bd12fd989939ca0d6f02bd1e16f0d83 100644 (file)
@@ -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>
index 30c15e4e1cc0d2899bf2fa943c1f7b95cc1d0e79..7d0204ea305bda88c727803d852cdebf003b057d 100644 (file)
 #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>
index d3faf80866314622aefbfb9d927124a3ebd72736..ef821b43b3d4891f30c4ee2ac3dd7aed64c2b8d3 100644 (file)
@@ -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
index ab05ee65702c85f5d9c0fc67a0312c3918b7eab1..6e8e790f84e74a3cba029f0738e55a8af85c3076 100644 (file)
 #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>
 
index b2fa6b2074ab1fe2515fac891e2f1afb7b37a2d5..b6eb8cb6b5e94ee3e2bb6f6488e5d640fbb35343 100644 (file)
@@ -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 */
index 3d4b2e8294ea6ba3bf990ca7af264024f1aadc66..0cd98d5714fc6c80c98f734306459089a7f10ba0 100644 (file)
@@ -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"
 
index 57f3db32122d4d856c60e248ea45f0ddc58ba409..3bb32a7c6d6798473d2ad8d8973608643f737b6e 100644 (file)
@@ -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
index db22b3af16d8a93e70655225b53334b99d476300..e057c03a197d9a3744dfadf378a504b9b8e1e865 100644 (file)
@@ -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>
 
index 28b7bd7e22eb475c0b85fb502dc843b10c27f59b..8da5fee321b57110da7fbc696dea6f5c0d256d71 100644 (file)
@@ -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>
index 72d6168d8a1be0c8c7d139a1bcf758d0f387d2db..df245353b12b4b3180d6bacb3a1bd41665b24208 100644 (file)
@@ -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>
 
index 2312e27362cbef83b7686150da7a896f0c085f24..0ec03ffb4846f51a3e20da9fc18477fa42bd9268 100644 (file)
@@ -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>
 
index ac80aaf5b4e304f5faed7cabeff7099324482cf1..3d3d5c9814ffc6cea96f4bc29bfdd752780d59b5 100644 (file)
@@ -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>
index 63bf20c4171972ce2f0515661d7de51ec8ee1835..08211e96ce6427f8fc188f12b04f0fd9bd5163cc 100644 (file)
@@ -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>
index a8b720ffe9e843b30cd15bcaa9b6a1c72d684173..76d50eb9f1db50c6e7ac0fa682ea84fe2830b761 100644 (file)
@@ -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)
index 9884304634f68a4a242cec3a81114f58c9d98ebf..c6cd7713bee7471b3a49da0687e4ac8b05bc87ae 100644 (file)
@@ -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>
index 6b1e2a2bba15c1ab71a881395aa4c2849a4669cd..51d802a165edf0fe5f51c4fbc57e0c8bb350cd50 100644 (file)
@@ -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>
 
index 794c7b7d5c92b2b5ea0491fd92764d23c6e63a03..337e83bf336279b268294af6b534ed6b99081d64 100644 (file)
@@ -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>