Skip to contentSkip to conversation

can: Explicitly include correct DT includes, part 2

PATCH In review Rob Herring 2 participants 2 messages Jul 24, 2023 – Jul 25, 2023

Subsystems (7)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 can: Explicitly include correct DT includes, part 2

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.

---
I had the CAN changes in a separate patch, but inadvertently put these in the 'net' patch.

v2:
- Split out can, dsa, wireless, phy/pcs to separate patches

---
 drivers/net/can/bxcan.c                    | 1 -
 drivers/net/can/ifi_canfd/ifi_canfd.c      | 1 -
 drivers/net/can/m_can/m_can.c              | 1 -
 drivers/net/can/m_can/m_can.h              | 1 -
 drivers/net/can/rcar/rcar_canfd.c          | 1 -
 drivers/net/can/sja1000/sja1000_platform.c | 1 -
 drivers/net/can/sun4i_can.c                | 1 -
 drivers/net/can/ti_hecc.c                  | 1 -
 8 files changed, 8 deletions(-)
drivers/net/can/bxcan.c +0 -1
index 39de7164bc4e..49cf9682b925 100644
@@ -23,7 +23,6 @@
 #include <linux/mfd/syscon.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
 
drivers/net/can/ifi_canfd/ifi_canfd.c +0 -1
index 1d6642c94f2f..72307297d75e 100644
@@ -20,7 +20,6 @@
 #include <linux/module.h>
 #include <linux/netdevice.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/platform_device.h>
 
 #include <linux/can/dev.h>
drivers/net/can/m_can/m_can.c +0 -1
index c5af92bcc9c9..4e76cd9c02b0 100644
@@ -18,7 +18,6 @@
 #include <linux/module.h>
 #include <linux/netdevice.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/phy/phy.h>
 #include <linux/pinctrl/consumer.h>
 #include <linux/platform_device.h>
drivers/net/can/m_can/m_can.h +0 -1
index a839dc71dc9b..267d06ce6ade 100644
@@ -22,7 +22,6 @@
 #include <linux/module.h>
 #include <linux/netdevice.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/phy/phy.h>
 #include <linux/pinctrl/consumer.h>
 #include <linux/pm_runtime.h>
drivers/net/can/rcar/rcar_canfd.c +0 -1
index e4d748913439..b82842718735 100644
@@ -34,7 +34,6 @@
 #include <linux/moduleparam.h>
 #include <linux/netdevice.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/phy/phy.h>
 #include <linux/platform_device.h>
 #include <linux/reset.h>
drivers/net/can/sja1000/sja1000_platform.c +0 -1
index 4e59952c66d4..33f0e46ab1c2 100644
@@ -17,7 +17,6 @@
 #include <linux/clk.h>
 #include <linux/io.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 
 #include "sja1000.h"
 
drivers/net/can/sun4i_can.c +0 -1
index 0827830bbf28..b493a3d8ea9a 100644
@@ -59,7 +59,6 @@
 #include <linux/io.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/platform_device.h>
 #include <linux/reset.h>
 
drivers/net/can/ti_hecc.c +0 -1
index 54284661992e..a8243acde92d 100644
@@ -21,7 +21,6 @@
 #include <linux/clk.h>
 #include <linux/io.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/regulator/consumer.h>
 
 #include <linux/can/dev.h>
Signature · 1 line
2.40.1
#1 lore raw
Quoted 10 lines · Rob Herring

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.

Applied to linux-can-next/testing.

Thanks,
Marc

Signature · 4 lines
Pengutronix e.K.                 | Marc Kleine-Budde          |
Embedded Linux                   | https://www.pengutronix.de |
Vertretung Nürnberg              | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-9   |