changeset 42:2746b160afb7

fteeprom-erase: we don't need to claim the interface
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 10 Sep 2023 21:26:04 +0000
parents 940cde8a99b6
children dbaf239436cf
files fteeprom/fteeprom-erase.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/fteeprom/fteeprom-erase.c	Sun Sep 10 21:22:20 2023 +0000
+++ b/fteeprom/fteeprom-erase.c	Sun Sep 10 21:26:04 2023 +0000
@@ -34,8 +34,12 @@
 		fprintf(stderr, "error: specified USB device not found\n");
 		exit(1);
 	}
-	usbh = usbwrap_open_dev(dev, 1);
+	usbh = usb_open(dev);
+	if (!usbh) {
+		fprintf(stderr, "error: usb_open() failed\n");
+		exit(1);
+	}
 	ftmini_erase_eeprom(usbh);
-	usbwrap_close_dev(usbh);
+	usb_close(usbh);
 	exit(0);
 }