diff options
author | Antoine Viallon | 2020-08-24 02:13:51 +0000 |
---|---|---|
committer | Antoine Viallon | 2020-08-24 02:13:51 +0000 |
commit | 215239a07891e8f107df24798192a0cfc48e33e7 (patch) | |
tree | 91e2f97f23037748762363e6153f8862d110c0b9 /acr122bug.patch | |
parent | 514d4abf4e390e397bdac24cde5b54078b9806d6 (diff) | |
download | aur-libnfc-no_alternate_usb-git.tar.gz |
Update patch and clean PKGBUILD a little bit
Diffstat (limited to 'acr122bug.patch')
-rw-r--r-- | acr122bug.patch | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/acr122bug.patch b/acr122bug.patch index 956c599a090d..745695c8384c 100644 --- a/acr122bug.patch +++ b/acr122bug.patch @@ -1,20 +1,20 @@ diff --git a/libnfc/drivers/acr122_usb.c b/libnfc/drivers/acr122_usb.c -index a6392e8..16eddef 100644 +index 17ae5fb..bab8bc2 100644 --- a/libnfc/drivers/acr122_usb.c +++ b/libnfc/drivers/acr122_usb.c -@@ -427,13 +427,13 @@ acr122_usb_open(const nfc_context *context, const nfc_connstring connstring) - goto free_mem; - } +@@ -434,13 +434,13 @@ acr122_usb_open(const nfc_context *context, const nfc_connstring connstring) -- res = usb_set_altinterface(data.pudh, 0); -+ /*res = usb_set_altinterface(data.pudh, 0); - if (res < 0) { - log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Unable to set alternate setting on USB interface (%s)", _usb_strerror(res)); - usb_close(data.pudh); - // we failed to use the specified device - goto free_mem; -- } -+ }*/ + // Check if there are more than 0 alternative interfaces and claim the first one + if (dev->config->interface->altsetting->bAlternateSetting > 0) { +- res = usb_set_altinterface(data.pudh, 0); ++ /*res = usb_set_altinterface(data.pudh, 0); + if (res < 0) { + log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "Unable to set alternate setting on USB interface (%s)", _usb_strerror(res)); + usb_close(data.pudh); + // we failed to use the specified device + goto free_mem; +- } ++ }*/ + } // Allocate memory for the device info and specification, fill it and return the info - pnd = nfc_device_new(context, connstring); |