From f6a4344c5b41c30bd918371796962bce29872676 Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Tue, 15 May 2018 14:13:32 +0200 Subject: device: Move dev_find_path() to device_const.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make it available early and use it in dev_find_next_pci_device(). Change-Id: I1d0ad07f37ea79dae2b9a592fcccba5e03fd86d5 Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/26294 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki --- src/device/device_util.c | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'src/device/device_util.c') diff --git a/src/device/device_util.c b/src/device/device_util.c index 3315e480fc55..4275d6e256aa 100644 --- a/src/device/device_util.c +++ b/src/device/device_util.c @@ -64,33 +64,6 @@ struct device *dev_find_lapic(unsigned apic_id) return result; } -/** - * Given a Device Path Type, find the device structure. - * - * @param prev_match The previously matched device instance. - * @param path_type The Device Path Type. - * @return Pointer to the device structure (if found), 0 otherwise. - */ -struct device *dev_find_path(struct device *prev_match, - enum device_path_type path_type) -{ - struct device *dev; - struct device *result = NULL; - - if (prev_match == NULL) - prev_match = all_devices; - else - prev_match = prev_match->next; - - for (dev = prev_match; dev; dev = dev->next) { - if (dev->path.type == path_type) { - result = dev; - break; - } - } - return result; -} - /** * Find a device of a given vendor and type. * -- cgit v1.2.3