Add 'discover' hook for drivers

Drivers can now offer a discover function, and are expected to offer the
device devtype during discovery, without accessing the USB device. Hmm.
Maybe we'll have to change that later...
This commit is contained in:
Daniel Drake
2007-10-30 22:15:45 +00:00
parent f0ef386f43
commit cc3e976042
2 changed files with 30 additions and 8 deletions

View File

@@ -103,6 +103,7 @@ struct fp_driver {
void *priv;
/* Device operations */
int (*discover)(struct usb_id *usb_id, uint32_t *devtype);
int (*init)(struct fp_dev *dev, unsigned long driver_data);
void (*exit)(struct fp_dev *dev);
int (*enroll)(struct fp_dev *dev, gboolean initial, int stage,
@@ -141,6 +142,7 @@ struct fp_dscv_dev {
struct usb_device *udev;
struct fp_driver *drv;
unsigned long driver_data;
uint32_t devtype;
};
enum fp_print_data_type {