* [PATCH] usb: host: xhci-plat: Use dev_is_pci() helper
@ 2023-04-05 7:01 Nobuhiro Iwamatsu
2023-04-05 7:22 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Nobuhiro Iwamatsu @ 2023-04-05 7:01 UTC (permalink / raw)
To: mathias.nyman, gregkh; +Cc: linux-usb, linux-kernel, Nobuhiro Iwamatsu
Use common dev_is_pci() helper for checking PCI devices.
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
---
drivers/usb/host/xhci-plat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index b9f9625467d61e..2c95189424fa6e 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -363,7 +363,7 @@ static int xhci_generic_plat_probe(struct platform_device *pdev)
is_acpi_device_node(sysdev->fwnode))
break;
#ifdef CONFIG_PCI
- else if (sysdev->bus == &pci_bus_type)
+ else if (dev_is_pci(sysdev))
break;
#endif
}
--
2.36.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] usb: host: xhci-plat: Use dev_is_pci() helper
2023-04-05 7:01 [PATCH] usb: host: xhci-plat: Use dev_is_pci() helper Nobuhiro Iwamatsu
@ 2023-04-05 7:22 ` Greg KH
2023-04-05 22:01 ` nobuhiro1.iwamatsu
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2023-04-05 7:22 UTC (permalink / raw)
To: Nobuhiro Iwamatsu; +Cc: mathias.nyman, linux-usb, linux-kernel
On Wed, Apr 05, 2023 at 04:01:41PM +0900, Nobuhiro Iwamatsu wrote:
> Use common dev_is_pci() helper for checking PCI devices.
>
> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
> ---
> drivers/usb/host/xhci-plat.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
> index b9f9625467d61e..2c95189424fa6e 100644
> --- a/drivers/usb/host/xhci-plat.c
> +++ b/drivers/usb/host/xhci-plat.c
> @@ -363,7 +363,7 @@ static int xhci_generic_plat_probe(struct platform_device *pdev)
> is_acpi_device_node(sysdev->fwnode))
> break;
> #ifdef CONFIG_PCI
> - else if (sysdev->bus == &pci_bus_type)
> + else if (dev_is_pci(sysdev))
With that change, you can also get rid of the #ifdef lines too, right?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] usb: host: xhci-plat: Use dev_is_pci() helper
2023-04-05 7:22 ` Greg KH
@ 2023-04-05 22:01 ` nobuhiro1.iwamatsu
0 siblings, 0 replies; 3+ messages in thread
From: nobuhiro1.iwamatsu @ 2023-04-05 22:01 UTC (permalink / raw)
To: gregkh; +Cc: mathias.nyman, linux-usb, linux-kernel
Hi,
> -----Original Message-----
> From: Greg KH <gregkh@linuxfoundation.org>
> Sent: Wednesday, April 5, 2023 4:22 PM
> To: iwamatsu nobuhiro(岩松 信洋 ○DITC□DIT○OST)
> <nobuhiro1.iwamatsu@toshiba.co.jp>
> Cc: mathias.nyman@intel.com; linux-usb@vger.kernel.org;
> linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] usb: host: xhci-plat: Use dev_is_pci() helper
>
> On Wed, Apr 05, 2023 at 04:01:41PM +0900, Nobuhiro Iwamatsu wrote:
> > Use common dev_is_pci() helper for checking PCI devices.
> >
> > Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
> > ---
> > drivers/usb/host/xhci-plat.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/usb/host/xhci-plat.c
> > b/drivers/usb/host/xhci-plat.c index b9f9625467d61e..2c95189424fa6e
> > 100644
> > --- a/drivers/usb/host/xhci-plat.c
> > +++ b/drivers/usb/host/xhci-plat.c
> > @@ -363,7 +363,7 @@ static int xhci_generic_plat_probe(struct
> platform_device *pdev)
> > is_acpi_device_node(sysdev->fwnode))
> > break;
> > #ifdef CONFIG_PCI
> > - else if (sysdev->bus == &pci_bus_type)
> > + else if (dev_is_pci(sysdev))
>
> With that change, you can also get rid of the #ifdef lines too, right?
Yes, that's right. I will send v2 patch with it.
Best regards,
Nobuhiro
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-04-05 22:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-05 7:01 [PATCH] usb: host: xhci-plat: Use dev_is_pci() helper Nobuhiro Iwamatsu
2023-04-05 7:22 ` Greg KH
2023-04-05 22:01 ` nobuhiro1.iwamatsu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).