From 5ffc2c8a3f38fbb7be2faadf207590acd3999205 Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Fri, 5 Aug 2022 12:58:18 +0200 Subject: pciexp_device: Join pciexp_find_(next_)extended_cap() APIs Move the `offset` parameter into pciexp_find_extended_cap(). If it's called with `0`, we start a new search. If it's an existing offset, we continue the search. This makes it easier to search for multiple occurences of a capa- bility in a single loop. Change-Id: I80115372a82523b90460d97f0fd0fa565c3f56cb Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/c/coreboot/+/66453 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak --- src/include/device/pciexp.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/include') diff --git a/src/include/device/pciexp.h b/src/include/device/pciexp.h index 13776dfa72..5a996834d2 100644 --- a/src/include/device/pciexp.h +++ b/src/include/device/pciexp.h @@ -32,9 +32,8 @@ void pciexp_hotplug_scan_bridge(struct device *dev); extern struct device_operations default_pciexp_hotplug_ops_bus; -unsigned int pciexp_find_extended_cap(const struct device *dev, unsigned int cap); -unsigned int pciexp_find_next_extended_cap(const struct device *dev, unsigned int cap, - unsigned int offset); +unsigned int pciexp_find_extended_cap(const struct device *dev, unsigned int cap, + unsigned int offset); static inline bool pciexp_is_downstream_port(int type) { -- cgit v1.2.3