Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d4e5bee authored by Yijing Wang's avatar Yijing Wang Committed by Greg Kroah-Hartman
Browse files

uwb: 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: default avatarYijing Wang <wangyijing@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1ae5799e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@ int umc_match_pci_id(struct umc_driver *umc_drv, struct umc_dev *umc)
	const struct pci_device_id *id_table = umc_drv->match_data;
	struct pci_dev *pci;

	if (umc->dev.parent->bus != &pci_bus_type)
	if (!dev_is_pci(umc->dev.parent))
		return 0;

	pci = to_pci_dev(umc->dev.parent);
+1 −1
Original line number Diff line number Diff line
@@ -143,7 +143,7 @@ int umc_match_pci_id(struct umc_driver *umc_drv, struct umc_dev *umc);
static inline struct pci_dev *umc_parent_pci_dev(struct umc_dev *umc_dev)
{
	struct pci_dev *pci_dev = NULL;
	if (umc_dev->dev.parent->bus == &pci_bus_type)
	if (dev_is_pci(umc_dev->dev.parent))
		pci_dev = to_pci_dev(umc_dev->dev.parent);
	return pci_dev;
}