diff options
author | Michael Brown <mcb30@ipxe.org> | 2020-10-30 13:51:30 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2020-10-30 13:54:55 +0000 |
commit | 16873703ddea2d64fac1809967ef5198b8764baa (patch) | |
tree | 0e82a7b1d7719cfebaa6649406804ab99524738e /src/drivers/bus | |
parent | e5e2f3fba840267118bf72c8093c673f056ffdc9 (diff) | |
download | ipxe-16873703ddea2d64fac1809967ef5198b8764baa.tar.gz |
[efi] Avoid dragging in USB subsystem via efi_usb_path()
Commit 87e39a9c9 ("[efi] Split efi_usb_path() out to a separate
function") unintentionally introduced an undefined symbol reference
from efi_path.o to usb_depth(), causing the USB subsystem to become a
dependency of all EFI builds.
Fix by converting usb_depth() to a static inline function.
Reported-by: Pico Mitchell <pico@randomapplications.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/bus')
-rw-r--r-- | src/drivers/bus/usb.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/drivers/bus/usb.c b/src/drivers/bus/usb.c index 70a86c913..428ae26c1 100644 --- a/src/drivers/bus/usb.c +++ b/src/drivers/bus/usb.c @@ -2278,23 +2278,6 @@ unsigned int usb_route_string ( struct usb_device *usb ) { } /** - * Get USB depth - * - * @v usb USB device - * @ret depth Hub depth - */ -unsigned int usb_depth ( struct usb_device *usb ) { - struct usb_device *parent; - unsigned int depth; - - /* Navigate up to root hub, constructing depth as we go */ - for ( depth = 0 ; ( parent = usb->port->hub->usb ) ; usb = parent ) - depth++; - - return depth; -} - -/** * Get USB root hub port * * @v usb USB device |