aboutsummaryrefslogtreecommitdiff
path: root/devel/libnfc/files/patch-libnfc_drivers_acr122__usb.c
blob: c4e7373cdc2fa4709ff79d6290fa1317b3e64d20 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
--- libnfc/drivers/acr122_usb.c.orig	2022-02-01 22:26:36 UTC
+++ libnfc/drivers/acr122_usb.c
@@ -419,6 +419,9 @@ acr122_usb_open(const nfc_context *context, const nfc_
         continue;
       // Reset device
       usb_reset(data.pudh);
+      // Reopen the device
+      if ((data.pudh = usb_open(dev)) == NULL)
+        continue;
       // Retrieve end points
       acr122_usb_get_end_points(dev, &data);
       // Claim interface