diff --git a/lib/libusb/libusb.3 b/lib/libusb/libusb.3 --- a/lib/libusb/libusb.3 +++ b/lib/libusb/libusb.3 @@ -220,6 +220,11 @@ Get the device contained by devh. Returns NULL on error. .Pp +.Ft libusb_device * +.Fn libusb_get_parent "libusb_device *dev" +Get dev's parent device. +Returns NULL if the device has no parent (i.e. is a root device). +.Pp .Ft int .Fn libusb_get_configuration "libusb_device_handle *devh" "int *config" Returns the value of the current configuration. diff --git a/lib/libusb/libusb10.c b/lib/libusb/libusb10.c --- a/lib/libusb/libusb10.c +++ b/lib/libusb/libusb10.c @@ -3,6 +3,7 @@ * * Copyright (c) 2009 Sylvestre Gallon. All rights reserved. * Copyright (c) 2009-2023 Hans Petter Selasky + * Copyright (c) 2024 Aymeric Wibo * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions