usb: Use dev_is_pci() to check whether it is pci device
Subsystems (2)
PATCH 1/2 usb: Use dev_is_pci() to check whether it is pci device
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 <[email protected]>
--- drivers/usb/host/ehci-dbg.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/host/ehci-dbg.c +1 -1
@@ -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 ;
Signature · 1 line
1.7.1
Quoted 13 lines · Yijing Wang
Use PCI standard marco
dev_is_pci()instead of directly comparepci_bus_typeto check whether it is pci device.Signed-off-by Yijing Wang <[email protected]>--- drivers/usb/host/ehci-dbg.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/usb/host/ehci-dbg.c +0
-0
drivers/usb/host/ehci-dbg.c static ssize_t fill_registers_buffer(struct debug_buffer *buf) · line 824
Quoted 8 lines
drivers/usb/host/ehci-dbg.c +1
-1@@ -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 <[email protected]>