* [PATCH 1/2] usb: Use dev_is_pci() to check whether it is pci device
@ 2013-12-05 11:21 Yijing Wang
2013-12-05 15:10 ` Alan Stern
0 siblings, 1 reply; 2+ messages in thread
From: Yijing Wang @ 2013-12-05 11:21 UTC (permalink / raw)
To: Greg Kroah-Hartman, Alan Stern
Cc: linux-usb, linux-kernel, Yijing Wang, Hanjun Guo
Use PCI standard marco dev_is_pci() instead of directly compare
pci_bus_type to check whether it is pci device.
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
---
drivers/usb/host/ehci-dbg.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c
index 4a9c2ed..0bb5e48 100644
--- a/drivers/usb/host/ehci-dbg.c
+++ b/drivers/usb/host/ehci-dbg.c
@@ -818,7 +818,7 @@ static ssize_t fill_registers_buffer(struct debug_buffer *buf)
#ifdef CONFIG_PCI
/* EHCI 0.96 and later may have "extended capabilities" */
- if (hcd->self.controller->bus == &pci_bus_type) {
+ if (dev_is_pci(hcd->self.controller)) {
struct pci_dev *pdev;
u32 offset, cap, cap2;
unsigned count = 256/4;
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/2] usb: Use dev_is_pci() to check whether it is pci device
2013-12-05 11:21 [PATCH 1/2] usb: Use dev_is_pci() to check whether it is pci device Yijing Wang
@ 2013-12-05 15:10 ` Alan Stern
0 siblings, 0 replies; 2+ messages in thread
From: Alan Stern @ 2013-12-05 15:10 UTC (permalink / raw)
To: Yijing Wang; +Cc: Greg Kroah-Hartman, linux-usb, linux-kernel, Hanjun Guo
On Thu, 5 Dec 2013, Yijing Wang wrote:
> Use PCI standard marco dev_is_pci() instead of directly compare
> pci_bus_type to check whether it is pci device.
>
> Signed-off-by: Yijing Wang <wangyijing@huawei.com>
> ---
> drivers/usb/host/ehci-dbg.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c
> index 4a9c2ed..0bb5e48 100644
> --- a/drivers/usb/host/ehci-dbg.c
> +++ b/drivers/usb/host/ehci-dbg.c
> @@ -818,7 +818,7 @@ static ssize_t fill_registers_buffer(struct debug_buffer *buf)
>
> #ifdef CONFIG_PCI
> /* EHCI 0.96 and later may have "extended capabilities" */
> - if (hcd->self.controller->bus == &pci_bus_type) {
> + if (dev_is_pci(hcd->self.controller)) {
> struct pci_dev *pdev;
> u32 offset, cap, cap2;
> unsigned count = 256/4;
Acked-by: Alan Stern <stern@rowland.harvard.edu>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-05 15:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-05 11:21 [PATCH 1/2] usb: Use dev_is_pci() to check whether it is pci device Yijing Wang
2013-12-05 15:10 ` Alan Stern
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).