usb_release() must be called before usb_reset(). Fix Issue 81 (Thanks to thaolx).

This commit is contained in:
Romuald Conty 2010-05-18 08:13:26 +00:00
parent 9941191cfc
commit 404dfba6e8

View file

@ -229,10 +229,10 @@ void pn53x_usb_disconnect(nfc_device_t* pnd)
usb_spec_t* pus = (usb_spec_t*)pnd->nds; usb_spec_t* pus = (usb_spec_t*)pnd->nds;
int ret; int ret;
DBG("%s","resetting USB");
usb_reset(pus->pudh);
if((ret = usb_release_interface(pus->pudh,0)) < 0) if((ret = usb_release_interface(pus->pudh,0)) < 0)
DBG("usb_release failed %i",ret); DBG("usb_release failed %i",ret);
DBG("%s","resetting USB");
usb_reset(pus->pudh);
if((ret = usb_close(pus->pudh)) < 0) if((ret = usb_close(pus->pudh)) < 0)
DBG("usb_close failed %i",ret); DBG("usb_close failed %i",ret);
free(pnd->nds); free(pnd->nds);