From fe204fe902f5d08dbf07e0f9686e4315c67292ea Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Tue, 6 Dec 2016 18:06:30 +0530 Subject: src/device: Get device structure by path type Add helper function to find a device by path type in the device tree. Change-Id: I8846f63bd2488788ea3c7ab5154e7cf431a252bc Credits-to: Aaron Durbin Signed-off-by: Subrata Banik Signed-off-by: Dhaval V Sharma Reviewed-on: https://review.coreboot.org/17731 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/include/device/device.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/include/device/device.h') diff --git a/src/include/device/device.h b/src/include/device/device.h index d81399d6ef..39bf718f1f 100644 --- a/src/include/device/device.h +++ b/src/include/device/device.h @@ -195,6 +195,7 @@ device_t find_dev_path(struct bus *parent, struct device_path *path); device_t alloc_find_dev(struct bus *parent, struct device_path *path); device_t dev_find_device (u16 vendor, u16 device, device_t from); device_t dev_find_class (unsigned int class, device_t from); +device_t dev_find_path(device_t prev_match, enum device_path_type path_type); device_t dev_find_slot (unsigned int bus, unsigned int devfn); device_t dev_find_slot_on_smbus (unsigned int bus, unsigned int addr); device_t dev_find_slot_pnp(u16 port, u16 device); -- cgit v1.2.3