Skip to contentSkip to conversation

usb: Add explicit of.h of_platform.h include

PATCH In review Rob Herring 3 participants 3 messages Apr 10, 2023 – Apr 17, 2023

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

PATCH 1/1 usb: Add explicit of.h of_platform.h include

Several USB drivers use of_platform_* functions which are declared in of_platform.h. of_platform.h gets implicitly included by of_device.h, but that is going to be removed soon. Nothing else depends on of_device.h so it can be dropped.

---
 drivers/usb/dwc3/dwc3-am62.c           | 2 +-
 drivers/usb/gadget/udc/rzv2m_usb3drd.c | 2 +-
 drivers/usb/mtu3/mtu3_host.c           | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/usb/dwc3/dwc3-am62.c +1 -1
index 173cf3579c55..4d674a243784 100644
@@ -11,7 +11,7 @@
 #include <linux/platform_device.h>
 #include <linux/mfd/syscon.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/pm_runtime.h>
 #include <linux/clk.h>
 #include <linux/regmap.h>
drivers/usb/gadget/udc/rzv2m_usb3drd.c +1 -1
index 3c8bbf843038..8aafd1ddf126 100644
@@ -6,7 +6,7 @@
  */
 
 #include <linux/io.h>
-#include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
 #include <linux/reset.h>
drivers/usb/mtu3/mtu3_host.c +1 -1
index f3903367a6a0..177d2caf887c 100644
@@ -11,7 +11,7 @@
 #include <linux/irq.h>
 #include <linux/kernel.h>
 #include <linux/mfd/syscon.h>
-#include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/regmap.h>
 
 #include "mtu3.h"
Signature · 1 line
2.39.2
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 54 lines · Rob Herring

Several USB drivers use of_platform_* functions which are declared in of_platform.h. of_platform.h gets implicitly included by of_device.h, but that is going to be removed soon. Nothing else depends on of_device.h so it can be dropped.

---
 drivers/usb/dwc3/dwc3-am62.c           | 2 +-
 drivers/usb/gadget/udc/rzv2m_usb3drd.c | 2 +-
 drivers/usb/mtu3/mtu3_host.c           | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/usb/dwc3/dwc3-am62.c +1 -1
index 173cf3579c55..4d674a243784 100644
@@ -11,7 +11,7 @@
 #include <linux/platform_device.h>
 #include <linux/mfd/syscon.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/pm_runtime.h>
 #include <linux/clk.h>
 #include <linux/regmap.h>
drivers/usb/gadget/udc/rzv2m_usb3drd.c +1 -1
index 3c8bbf843038..8aafd1ddf126 100644
@@ -6,7 +6,7 @@
  */
 
 #include <linux/io.h>
-#include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
 #include <linux/reset.h>
drivers/usb/mtu3/mtu3_host.c +1 -1
index f3903367a6a0..177d2caf887c 100644
@@ -11,7 +11,7 @@
 #include <linux/irq.h>
 #include <linux/kernel.h>
 #include <linux/mfd/syscon.h>
-#include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/regmap.h>
 
 #include "mtu3.h"
Signature · 1 line
2.39.2

For dwc3 change:

Thanks,
Thinh

maintainer Acked-by on v1 1/1
#2 lore raw
In reply to Rob Herring
Quoted 51 lines · Rob Herring

External email : Please do not click links or open attachments until you have verified the sender or the content.

Several USB drivers use of_platform_* functions which are declared in of_platform.h. of_platform.h gets implicitly included by of_device.h, but that is going to be removed soon. Nothing else depends on of_device.h
so it can be dropped.

---
 drivers/usb/dwc3/dwc3-am62.c           | 2 +-
 drivers/usb/gadget/udc/rzv2m_usb3drd.c | 2 +-
 drivers/usb/mtu3/mtu3_host.c           | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/usb/dwc3/dwc3- renamed from drivers/usb/dwc3/dwc3-am62.c +0 -0

am62.c
index 173cf3579c55..4d674a243784 100644

drivers/usb/dwc3/dwc3-am62.c +1 -1
@@ -11,7 +11,7 @@
 #include <linux/platform_device.h>
 #include <linux/mfd/syscon.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/pm_runtime.h>
 #include <linux/clk.h>
 #include <linux/regmap.h>
drivers/usb/gadget/udc/rzv2m_usb3drd.c +1 -1
index 3c8bbf843038..8aafd1ddf126 100644
@@ -6,7 +6,7 @@
  */
 
 #include <linux/io.h>
-#include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
 #include <linux/reset.h>
drivers/usb/mtu3/mtu3_host.c +0 -0
index f3903367a6a0..177d2caf887c 100644

drivers/usb/mtu3/mtu3_host.c line 15

Quoted 6 lines
drivers/usb/mtu3/mtu3_host.c +1 -1
@@ -11,7 +11,7 @@
 #include <linux/irq.h>
 #include <linux/kernel.h>
 #include <linux/mfd/syscon.h>
-#include <linux/of_device.h>
+#include <linux/of_platform.h>
 #include <linux/regmap.h>

For mtu3 change:

Thanks

Quoted 5 lines
drivers/usb/mtu3/mtu3_host.c +0 -1
 #include "mtu3.h"
--

2.39.2