summaryrefslogtreecommitdiffstats
path: root/digilent_spi.c
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2018-07-17 02:16:44 +0200
committerNico Huber <nico.h@gmx.de>2018-07-31 20:45:52 +0000
commitf3ce951fb3d9d23d97a39f0b7e8a090dd477d45a (patch)
tree71cfad3c91f0fc21906f712e4e8eae129189676e /digilent_spi.c
parentb2154e8a1d456875122cbbff2a18e5e1c55ef4d2 (diff)
downloadflashrom-f3ce951fb3d9d23d97a39f0b7e8a090dd477d45a.tar.gz
flashrom-f3ce951fb3d9d23d97a39f0b7e8a090dd477d45a.tar.bz2
flashrom-f3ce951fb3d9d23d97a39f0b7e8a090dd477d45a.zip
digilent_spi: Avoid deprecated libusb functions
libusb 1.0.22 marked libusb_set_debug as deprecated. For such versions of libusb, use libusb_set_option instead. Change-Id: Ie139de36f15c4f4d87787cab0f968a2f0e6f0c8c Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/27503 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'digilent_spi.c')
-rw-r--r--digilent_spi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/digilent_spi.c b/digilent_spi.c
index 458e1b637..d42c90f46 100644
--- a/digilent_spi.c
+++ b/digilent_spi.c
@@ -386,7 +386,11 @@ int digilent_spi_init(void)
return -1;
}
+#if LIBUSB_API_VERSION < 0x01000106
libusb_set_debug(NULL, 3);
+#else
+ libusb_set_option(NULL, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_INFO);
+#endif
uint16_t vid = devs_digilent_spi[0].vendor_id;
uint16_t pid = devs_digilent_spi[0].device_id;