1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

scd: Clean up unused shutdown method.

* scd/apdu.c (shutdown_ccid_reader, apdu_shutdown_reader): Remove.
(reset_ccid_reader): Don't set shutdown_reader.
* scd/ccid-driver.c (ccid_shutdown_reader): Remove.

--

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2016-09-02 13:58:33 +09:00
parent 8b6c0bae33
commit d1ae710335
3 changed files with 0 additions and 121 deletions

View file

@ -1717,78 +1717,6 @@ do_close_reader (ccid_driver_t handle)
}
/* Reset a reader on HANDLE. This is useful in case a reader has been
plugged of and inserted at a different port. By resetting the
handle, the same reader will be get used. Note, that on error the
handle won't get released.
This does not return an ATR, so ccid_get_atr should be called right
after this one.
*/
int
ccid_shutdown_reader (ccid_driver_t handle)
{
int rc = 0;
libusb_device_handle *idev = NULL;
unsigned char *ifcdesc_extra = NULL;
size_t ifcdesc_extra_len;
int ifc_no, ep_bulk_out, ep_bulk_in, ep_intr;
if (!handle || !handle->rid)
return CCID_DRIVER_ERR_INV_VALUE;
do_close_reader (handle);
if (scan_or_find_devices (-1, handle->rid, NULL, NULL,
&ifcdesc_extra, &ifcdesc_extra_len,
&ifc_no, &ep_bulk_out, &ep_bulk_in, &ep_intr,
&idev, NULL) || !idev)
{
DEBUGOUT_1 ("no CCID reader with ID %s\n", handle->rid);
return CCID_DRIVER_ERR_NO_READER;
}
if (idev)
{
handle->idev = idev;
handle->ifc_no = ifc_no;
handle->ep_bulk_out = ep_bulk_out;
handle->ep_bulk_in = ep_bulk_in;
handle->ep_intr = ep_intr;
if (parse_ccid_descriptor (handle, ifcdesc_extra, ifcdesc_extra_len))
{
DEBUGOUT ("device not supported\n");
rc = CCID_DRIVER_ERR_NO_READER;
goto leave;
}
rc = libusb_claim_interface (idev, ifc_no);
if (rc)
{
DEBUGOUT_1 ("usb_claim_interface failed: %d\n", rc);
rc = CCID_DRIVER_ERR_CARD_IO_ERROR;
goto leave;
}
}
leave:
free (ifcdesc_extra);
if (rc)
{
if (handle->idev)
libusb_close (handle->idev);
handle->idev = NULL;
if (handle->dev_fd != -1)
close (handle->dev_fd);
handle->dev_fd = -1;
}
return rc;
}
int
ccid_set_progress_cb (ccid_driver_t handle,
void (*cb)(void *, const char *, int, int, int),