Skip to contentSkip to conversation

usb: Use dev_is_pci() to check whether it is pci device

PATCH In review Yijing Wang 2 participants 2 messages Dec 5, 2013

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

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.

---
 drivers/usb/host/ehci-dbg.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/host/ehci-dbg.c +1 -1
index 4a9c2ed..0bb5e48 100644
@@ -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
maintainer Acked-by on v1 1/2
#1 lore raw
Quoted 13 lines · Yijing Wang

Use PCI standard marco dev_is_pci() instead of directly compare pci_bus_type to check whether it is pci device.

---
 drivers/usb/host/ehci-dbg.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/host/ehci-dbg.c +0 -0
index 4a9c2ed..0bb5e48 100644

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;