net: dsa: Explicitly include correct DT includes
authorRob Herring <robh@kernel.org>
Mon, 24 Jul 2023 21:18:58 +0000 (15:18 -0600)
committerJakub Kicinski <kuba@kernel.org>
Thu, 27 Jul 2023 04:54:16 +0000 (21:54 -0700)
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.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://lore.kernel.org/r/20230724211859.805481-1-robh@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
17 files changed:
drivers/net/dsa/b53/b53_mdio.c
drivers/net/dsa/b53/b53_mmap.c
drivers/net/dsa/hirschmann/hellcreek.c
drivers/net/dsa/hirschmann/hellcreek_ptp.c
drivers/net/dsa/lan9303-core.c
drivers/net/dsa/microchip/ksz8863_smi.c
drivers/net/dsa/microchip/ksz_common.c
drivers/net/dsa/mt7530-mmio.c
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/ocelot/felix_vsc9959.c
drivers/net/dsa/ocelot/seville_vsc9953.c
drivers/net/dsa/qca/qca8k-leds.c
drivers/net/dsa/realtek/realtek-mdio.c
drivers/net/dsa/realtek/realtek-smi.c
drivers/net/dsa/sja1105/sja1105_main.c
drivers/net/dsa/vitesse-vsc73xx-core.c
drivers/net/dsa/xrs700x/xrs700x.c

index 8b422b298cd519e730f3b16b09212dd1378e6505..4d55d8d1837681afd63ed27e51742cef88485a0a 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/kernel.h>
 #include <linux/phy.h>
 #include <linux/module.h>
+#include <linux/of.h>
 #include <linux/delay.h>
 #include <linux/brcmphy.h>
 #include <linux/rtnetlink.h>
index 5db1ed26f03a23b45f0f78626e0be92c5ddb5b1e..5e39641ea887282d23f1afdaf61a080f5dd4f1b4 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/bits.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
+#include <linux/of.h>
 #include <linux/io.h>
 #include <linux/platform_device.h>
 #include <linux/platform_data/b53.h>
index af50001ccdd4e63e58d639bdf6941fbaedd5ac64..720f4e4ed0b032623dc47c10dd99f3005e345d23 100644 (file)
@@ -11,7 +11,6 @@
 #include <linux/module.h>
 #include <linux/device.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/of_mdio.h>
 #include <linux/platform_device.h>
 #include <linux/bitops.h>
index 3e44ccb7db84cf3ffa87c254b8649640deed3522..5249a1c2a80b8caa29451af8f6315eef29edb258 100644 (file)
@@ -9,6 +9,7 @@
  *         Kurt Kanzenbach <kurt@linutronix.de>
  */
 
+#include <linux/of.h>
 #include <linux/ptp_clock_kernel.h>
 #include "hellcreek.h"
 #include "hellcreek_ptp.h"
index b0da1e4de63c3c06b50cd5e813e61ea4e87e44fa..ee67adeb2cdbfa95c5009c5c5dd781607efdc070 100644 (file)
@@ -8,6 +8,7 @@
 #include <linux/regmap.h>
 #include <linux/mutex.h>
 #include <linux/mii.h>
+#include <linux/of.h>
 #include <linux/phy.h>
 #include <linux/if_bridge.h>
 #include <linux/if_vlan.h>
index fd6e2e69a42ae796bb07574e7f0a1854606b5ab2..5711a59e2ac94900c985666dba8734a9ff21d9a3 100644 (file)
@@ -5,6 +5,9 @@
  * Copyright (C) 2019 Pengutronix, Michael Grzeschik <kernel@pengutronix.de>
  */
 
+#include <linux/mod_devicetable.h>
+#include <linux/property.h>
+
 #include "ksz8.h"
 #include "ksz_common.h"
 
index 1de2251a42dc3c1ea4b456d226c9fc9ac8b1067f..2414c1f8bc2dee251526f989a9d3dbd2f2f8dd07 100644 (file)
@@ -18,8 +18,8 @@
 #include <linux/if_vlan.h>
 #include <linux/irq.h>
 #include <linux/irqdomain.h>
+#include <linux/of.h>
 #include <linux/of_mdio.h>
-#include <linux/of_device.h>
 #include <linux/of_net.h>
 #include <linux/micrel_phy.h>
 #include <net/dsa.h>
index 1a3d4b692f349d41905d4c49f12e008c129fafd4..0a6a2fe34e64f01d6a7073ec490b6e14512701d4 100644 (file)
@@ -1,7 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0-only
 
+#include <linux/mod_devicetable.h>
 #include <linux/module.h>
-#include <linux/of_platform.h>
+#include <linux/platform_device.h>
 #include <linux/regmap.h>
 #include <linux/regulator/consumer.h>
 #include <linux/reset.h>
index 11a2e3d38484189e9c2d31fb14de49561b1a8d4a..bce9c9e437520ab9fd9710f4f78626f86d845f53 100644 (file)
@@ -23,7 +23,7 @@
 #include <linux/list.h>
 #include <linux/mdio.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/of_irq.h>
 #include <linux/of_mdio.h>
 #include <linux/platform_data/mv88e6xxx.h>
index 1c113957fcf45f44a8d4ba38e762e88e10c63712..dce3548dcd057d486d05ad8499e776d55bea3b6e 100644 (file)
@@ -16,6 +16,7 @@
 #include <net/pkt_sched.h>
 #include <linux/iopoll.h>
 #include <linux/mdio.h>
+#include <linux/of.h>
 #include <linux/pci.h>
 #include <linux/time.h>
 #include "felix.h"
index 15003b2af264d1448ea4880fb09e5501756fd590..8f912bda120b3b545f2156a015fc217df42315ee 100644 (file)
@@ -2,13 +2,14 @@
 /* Distributed Switch Architecture VSC9953 driver
  * Copyright (C) 2020, Maxim Kochetkov <fido_max@inbox.ru>
  */
+#include <linux/platform_device.h>
 #include <linux/types.h>
 #include <soc/mscc/ocelot_vcap.h>
 #include <soc/mscc/ocelot_sys.h>
 #include <soc/mscc/ocelot.h>
 #include <linux/mdio/mdio-mscc-miim.h>
+#include <linux/mod_devicetable.h>
 #include <linux/of_mdio.h>
-#include <linux/of_platform.h>
 #include <linux/pcs-lynx.h>
 #include <linux/dsa/ocelot.h>
 #include <linux/iopoll.h>
index 1261e0bb21efed27355f0f9fe9719849796a4adc..e8c16e76e34bb999a0b17af81cfb3d58ff7f06f7 100644 (file)
@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
+#include <linux/property.h>
 #include <linux/regmap.h>
 #include <net/dsa.h>
 
index 5a8fe707ca25ef7bafa7f1c7448ef8b158018fdf..4310e7793e5862919959b56398876a2a61c44392 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 #include <linux/module.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/overflow.h>
 #include <linux/regmap.h>
 
index 1b447d96b9c46c5d62358ab1bf401533cabe017c..c2bd8bb6c9c22288b17d945546815b63fd2edf01 100644 (file)
@@ -31,7 +31,6 @@
 #include <linux/spinlock.h>
 #include <linux/skbuff.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/of_mdio.h>
 #include <linux/delay.h>
 #include <linux/gpio/consumer.h>
index 52dd52d6c43d05eb82d1bf68fc6bb4892e64b473..331bb1c6676aca8940aafcc956ef8769ccca5ae3 100644 (file)
@@ -15,7 +15,6 @@
 #include <linux/of.h>
 #include <linux/of_net.h>
 #include <linux/of_mdio.h>
-#include <linux/of_device.h>
 #include <linux/pcs/pcs-xpcs.h>
 #include <linux/netdev_features.h>
 #include <linux/netdevice.h>
index ef1a4a7c47b23150ac833867a35a004e46cd5361..4f09e7438f3b933d6f5feaa9970810968c7abdcb 100644 (file)
@@ -18,7 +18,6 @@
 #include <linux/module.h>
 #include <linux/device.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/of_mdio.h>
 #include <linux/bitops.h>
 #include <linux/if_bridge.h>
index fa622639d640138d96404a013ad5328f9bd41649..753fef757f11669b074c0c60357110bdd7560e20 100644 (file)
@@ -7,7 +7,7 @@
 #include <net/dsa.h>
 #include <linux/etherdevice.h>
 #include <linux/if_bridge.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/netdev_features.h>
 #include <linux/if_hsr.h>
 #include "xrs700x.h"