xen: Use dev_is_pci() to check whether it is pci device
PATCH 1/1 xen: 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/xen/dbgp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/xen/dbgp.c +1 -1
@@ -19,7 +19,7 @@ static int xen_dbgp_op(struct usb_hcd *hcd, int op) dbgp.op = op;#ifdef CONFIG_PCI -if (ctrlr->bus == &pci_bus_type) { +if (dev_is_pci (ctrlr)) {const struct pci_dev *pdev =to_pci_dev (ctrlr); dbgp.u.pci.seg =pci_domain_nr (pdev->bus);
Signature · 1 line
1.7.1
Quoted 2 lines · Yijing Wang
Use PCI standard marco
dev_is_pci()instead of directly comparepci_bus_typeto check whether it is pci device.
Jan, you OK with this?
Quoted 23 lines
Signed-off-by Yijing Wang <[email protected]>--- drivers/xen/dbgp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/xen/dbgp.c +1
-1@@ -19,7 +19,7 @@ static int xen_dbgp_op(struct usb_hcd *hcd, int op) dbgp.op = op;#ifdef CONFIG_PCI -if (ctrlr->bus == &pci_bus_type) { +if (dev_is_pci (ctrlr)) {const struct pci_dev *pdev =to_pci_dev (ctrlr); dbgp.u.pci.seg =pci_domain_nr (pdev->bus);Signature · 1 line
1.7.1
Quoted 2 lines · Yijing Wang
Use PCI standard marco
dev_is_pci()instead of directly comparepci_bus_typeto check whether it is pci device.
Jan, you OK with this?
Quoted 23 lines
Signed-off-by Yijing Wang <[email protected]>--- drivers/xen/dbgp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/xen/dbgp.c +1
-1@@ -19,7 +19,7 @@ static int xen_dbgp_op(struct usb_hcd *hcd, int op) dbgp.op = op;#ifdef CONFIG_PCI -if (ctrlr->bus == &pci_bus_type) { +if (dev_is_pci (ctrlr)) {const struct pci_dev *pdev =to_pci_dev (ctrlr); dbgp.u.pci.seg =pci_domain_nr (pdev->bus);Signature · 1 line
1.7.1
Quoted 6 lines
Quoted 1 line
Quoted 1 line · Konrad Rzeszutek Wilk
Quoted 2 lines · Yijing Wang
Use PCI standard marco
dev_is_pci()instead of directly comparepci_bus_typeto check whether it is pci device.Jan, you OK with this?
Yes, sure - I simply wasn't aware of that wrapper.
Jan
Quoted 22 lines
Quoted 22 lines
Signed-off-by Yijing Wang <[email protected]>--- drivers/xen/dbgp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/xen/dbgp.c +1
-1@@ -19,7 +19,7 @@ static int xen_dbgp_op(struct usb_hcd *hcd, int op) dbgp.op = op;#ifdef CONFIG_PCI -if (ctrlr->bus == &pci_bus_type) { +if (dev_is_pci (ctrlr)) {const struct pci_dev *pdev =to_pci_dev (ctrlr); dbgp.u.pci.seg =pci_domain_nr (pdev->bus);Signature · 1 line
1.7.1
Quoted 6 lines
Quoted 1 line
Quoted 1 line · Konrad Rzeszutek Wilk
Quoted 2 lines · Yijing Wang
Use PCI standard marco
dev_is_pci()instead of directly comparepci_bus_typeto check whether it is pci device.Jan, you OK with this?
Yes, sure - I simply wasn't aware of that wrapper.
Jan
Quoted 22 lines
Quoted 22 lines
Signed-off-by Yijing Wang <[email protected]>--- drivers/xen/dbgp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/xen/dbgp.c +1
-1@@ -19,7 +19,7 @@ static int xen_dbgp_op(struct usb_hcd *hcd, int op) dbgp.op = op;#ifdef CONFIG_PCI -if (ctrlr->bus == &pci_bus_type) { +if (dev_is_pci (ctrlr)) {const struct pci_dev *pdev =to_pci_dev (ctrlr); dbgp.u.pci.seg =pci_domain_nr (pdev->bus);Signature · 1 line
1.7.1