aboutsummaryrefslogtreecommitdiffstats
path: root/scd/ccid-driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'scd/ccid-driver.c')
-rw-r--r--scd/ccid-driver.c73
1 files changed, 0 insertions, 73 deletions
diff --git a/scd/ccid-driver.c b/scd/ccid-driver.c
index 95f6c02a6..07e884c01 100644
--- a/scd/ccid-driver.c
+++ b/scd/ccid-driver.c
@@ -1744,79 +1744,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;
- struct usb_device *dev = NULL;
- usb_dev_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, &dev,
- &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 = usb_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)
- usb_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),