diff options
author | Patrick Rudolph <patrick.rudolph@9elements.com> | 2024-01-22 15:39:46 +0100 |
---|---|---|
committer | Lean Sheng Tan <sheng.tan@9elements.com> | 2024-01-24 08:46:19 +0000 |
commit | f95dbcee713d3a8a081644ee345ce0f6fedf39ac (patch) | |
tree | 246036838430e0f3724b18cd482cface0c6c853c /src/drivers/usb/pci_xhci/pci_xhci.c | |
parent | d8796e50f322ea81fb61ebfce60f3f4d82d0bf2c (diff) |
device: Add inline method to identify PATH_ROOT
Add and use inline method to identify the root device.
Change-Id: I394c8668245bcfea6414b8ca5f14ef8135897e59
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80169
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/drivers/usb/pci_xhci/pci_xhci.c')
-rw-r--r-- | src/drivers/usb/pci_xhci/pci_xhci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/usb/pci_xhci/pci_xhci.c b/src/drivers/usb/pci_xhci/pci_xhci.c index 6d022d1455..398595d114 100644 --- a/src/drivers/usb/pci_xhci/pci_xhci.c +++ b/src/drivers/usb/pci_xhci/pci_xhci.c @@ -73,7 +73,7 @@ static bool xhci_port_exists(const struct device *dev, const struct usb_path *pa static const struct device *get_xhci_dev(const struct device *dev) { while (dev && dev->ops != &xhci_pci_ops) { - if (dev->path.type == DEVICE_PATH_ROOT) + if (is_root_device(dev)) return NULL; dev = dev->bus->dev; |