diff mbox series

usb: uhci-grlib: Explicitly include linux/platform_device.h

Message ID 20240122082225.984523-1-andreas@gaisler.com (mailing list archive)
State Superseded
Headers show
Series usb: uhci-grlib: Explicitly include linux/platform_device.h | expand

Commit Message

Andreas Larsson Jan. 22, 2024, 8:22 a.m. UTC
This fixes relying upon linux/of_platform.h to include
linux/platform_device.h, which it no longer does, thereby fixing
compilation problems like:

In file included from drivers/usb/host/uhci-hcd.c:850:
drivers/usb/host/uhci-grlib.c: In function 'uhci_hcd_grlib_probe':
drivers/usb/host/uhci-grlib.c:92:29: error: invalid use of undefined type 'struct platform_device'
   92 |  struct device_node *dn = op->dev.of_node;
      |                             ^~

Fixes: 0d18bcdebb2f ("of: Stop circularly including of_device.h and of_platform.h")
Signed-off-by: Andreas Larsson <andreas@gaisler.com>
---
 drivers/usb/host/uhci-grlib.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Greg KH Jan. 28, 2024, 12:31 a.m. UTC | #1
On Mon, Jan 22, 2024 at 09:22:25AM +0100, Andreas Larsson wrote:
> This fixes relying upon linux/of_platform.h to include
> linux/platform_device.h, which it no longer does, thereby fixing
> compilation problems like:
> 
> In file included from drivers/usb/host/uhci-hcd.c:850:
> drivers/usb/host/uhci-grlib.c: In function 'uhci_hcd_grlib_probe':
> drivers/usb/host/uhci-grlib.c:92:29: error: invalid use of undefined type 'struct platform_device'
>    92 |  struct device_node *dn = op->dev.of_node;
>       |                             ^~
> 
> Fixes: 0d18bcdebb2f ("of: Stop circularly including of_device.h and of_platform.h")

I don't see this commit id in Linus's tree, where is it?

thanks,

greg k-h
Andreas Larsson Jan. 29, 2024, 7:41 a.m. UTC | #2
On 2024-01-28 01:31, Greg Kroah-Hartman wrote:
> On Mon, Jan 22, 2024 at 09:22:25AM +0100, Andreas Larsson wrote:
>> This fixes relying upon linux/of_platform.h to include
>> linux/platform_device.h, which it no longer does, thereby fixing
>> compilation problems like:
>>
>> In file included from drivers/usb/host/uhci-hcd.c:850:
>> drivers/usb/host/uhci-grlib.c: In function 'uhci_hcd_grlib_probe':
>> drivers/usb/host/uhci-grlib.c:92:29: error: invalid use of undefined type 'struct platform_device'
>>    92 |  struct device_node *dn = op->dev.of_node;
>>       |                             ^~
>>
>> Fixes: 0d18bcdebb2f ("of: Stop circularly including of_device.h and of_platform.h")
> 
> I don't see this commit id in Linus's tree, where is it?

Ah, sorry, it went into Linus's tree with a different commit ID. I
should have referred to ef175b29a242.
Cheers,
Andreas
Greg KH Jan. 29, 2024, 2:58 p.m. UTC | #3
On Mon, Jan 29, 2024 at 08:41:50AM +0100, Andreas Larsson wrote:
> On 2024-01-28 01:31, Greg Kroah-Hartman wrote:
> > On Mon, Jan 22, 2024 at 09:22:25AM +0100, Andreas Larsson wrote:
> >> This fixes relying upon linux/of_platform.h to include
> >> linux/platform_device.h, which it no longer does, thereby fixing
> >> compilation problems like:
> >>
> >> In file included from drivers/usb/host/uhci-hcd.c:850:
> >> drivers/usb/host/uhci-grlib.c: In function 'uhci_hcd_grlib_probe':
> >> drivers/usb/host/uhci-grlib.c:92:29: error: invalid use of undefined type 'struct platform_device'
> >>    92 |  struct device_node *dn = op->dev.of_node;
> >>       |                             ^~
> >>
> >> Fixes: 0d18bcdebb2f ("of: Stop circularly including of_device.h and of_platform.h")
> > 
> > I don't see this commit id in Linus's tree, where is it?
> 
> Ah, sorry, it went into Linus's tree with a different commit ID. I
> should have referred to ef175b29a242.

Please fix up and resend.

thanks,

greg k-h
Greg KH Jan. 29, 2024, 2:59 p.m. UTC | #4
On Mon, Jan 29, 2024 at 06:58:50AM -0800, Greg Kroah-Hartman wrote:
> On Mon, Jan 29, 2024 at 08:41:50AM +0100, Andreas Larsson wrote:
> > On 2024-01-28 01:31, Greg Kroah-Hartman wrote:
> > > On Mon, Jan 22, 2024 at 09:22:25AM +0100, Andreas Larsson wrote:
> > >> This fixes relying upon linux/of_platform.h to include
> > >> linux/platform_device.h, which it no longer does, thereby fixing
> > >> compilation problems like:
> > >>
> > >> In file included from drivers/usb/host/uhci-hcd.c:850:
> > >> drivers/usb/host/uhci-grlib.c: In function 'uhci_hcd_grlib_probe':
> > >> drivers/usb/host/uhci-grlib.c:92:29: error: invalid use of undefined type 'struct platform_device'
> > >>    92 |  struct device_node *dn = op->dev.of_node;
> > >>       |                             ^~
> > >>
> > >> Fixes: 0d18bcdebb2f ("of: Stop circularly including of_device.h and of_platform.h")
> > > 
> > > I don't see this commit id in Linus's tree, where is it?
> > 
> > Ah, sorry, it went into Linus's tree with a different commit ID. I
> > should have referred to ef175b29a242.
> 
> Please fix up and resend.

Ah you did, just hadn't read all of my email yet, sorry for the noise...
diff mbox series

Patch

diff --git a/drivers/usb/host/uhci-grlib.c b/drivers/usb/host/uhci-grlib.c
index ac3fc5970315..cfebb833668e 100644
--- a/drivers/usb/host/uhci-grlib.c
+++ b/drivers/usb/host/uhci-grlib.c
@@ -22,6 +22,7 @@ 
 #include <linux/of_irq.h>
 #include <linux/of_address.h>
 #include <linux/of_platform.h>
+#include <linux/platform_device.h>
 
 static int uhci_grlib_init(struct usb_hcd *hcd)
 {