lib: Use fp_dev to access USB device
Instead of having own own pointer in fp_img_dev
This commit is contained in:
parent
4dc8aa6dfa
commit
0b7477e72c
4 changed files with 2 additions and 6 deletions
|
@ -87,7 +87,7 @@ static int do_write_regv(struct write_regv_data *wdata, int upper_bound)
|
|||
data[data_offset++] = regwrite->value;
|
||||
}
|
||||
|
||||
libusb_fill_bulk_transfer(transfer, wdata->imgdev->udev, EP_OUT, data,
|
||||
libusb_fill_bulk_transfer(transfer, FP_DEV(wdata->imgdev)->udev, EP_OUT, data,
|
||||
alloc_size, write_regv_trf_complete, wdata, BULK_TIMEOUT);
|
||||
r = libusb_submit_transfer(transfer);
|
||||
if (r < 0) {
|
||||
|
|
|
@ -139,7 +139,6 @@ enum fp_imgdev_verify_state {
|
|||
};
|
||||
|
||||
struct fp_img_dev {
|
||||
libusb_device_handle *udev;
|
||||
struct fp_dev *parent;
|
||||
|
||||
enum fp_imgdev_action action;
|
||||
|
|
|
@ -536,7 +536,7 @@ API_EXPORTED struct fp_minutia **fp_img_get_minutiae(struct fp_img *img,
|
|||
libusb_device_handle *
|
||||
fpi_imgdev_get_usb_dev(struct fp_img_dev *dev)
|
||||
{
|
||||
return dev->udev;
|
||||
return FP_DEV(dev)->udev;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -40,9 +40,6 @@ static int img_dev_open(struct fp_dev *dev, unsigned long driver_data)
|
|||
imgdev->enroll_stage = 0;
|
||||
dev->nr_enroll_stages = IMG_ENROLL_STAGES;
|
||||
|
||||
/* for consistency in driver code, allow udev access through imgdev */
|
||||
imgdev->udev = dev->udev;
|
||||
|
||||
if (imgdrv->open) {
|
||||
r = imgdrv->open(imgdev, driver_data);
|
||||
if (r)
|
||||
|
|
Loading…
Reference in a new issue