some libusb pointers are now const

This commit is contained in:
Daniel Drake 2008-04-06 23:55:41 +01:00
parent 40e7ac195a
commit 870ddfb905
3 changed files with 9 additions and 8 deletions

View file

@ -357,7 +357,8 @@ static struct fp_driver *find_supporting_driver(libusb_device *udev,
const struct usb_id **usb_id)
{
GSList *elem = registered_drivers;
struct libusb_device_descriptor *dsc = libusb_get_device_descriptor(udev);
const struct libusb_device_descriptor *dsc =
libusb_get_device_descriptor(udev);
do {
struct fp_driver *drv = elem->data;

View file

@ -1102,10 +1102,10 @@ static void dev_deactivate(struct fp_img_dev *dev)
static int dev_init(struct fp_img_dev *dev, unsigned long driver_data)
{
struct libusb_config_descriptor *config;
struct libusb_interface *iface = NULL;
struct libusb_interface_descriptor *iface_desc;
struct libusb_endpoint_descriptor *ep;
const struct libusb_config_descriptor *config;
const struct libusb_interface *iface = NULL;
const struct libusb_interface_descriptor *iface_desc;
const struct libusb_endpoint_descriptor *ep;
struct uru4k_dev *urudev;
int i;
int r;
@ -1113,7 +1113,7 @@ static int dev_init(struct fp_img_dev *dev, unsigned long driver_data)
/* Find fingerprint interface */
config = libusb_get_config_descriptor(libusb_get_device(dev->udev));
for (i = 0; i < config->bNumInterfaces; i++) {
struct libusb_interface *cur_iface = &config->interface[i];
const struct libusb_interface *cur_iface = &config->interface[i];
if (cur_iface->num_altsetting < 1)
continue;

View file

@ -291,8 +291,8 @@ API_EXPORTED int fp_get_next_timeout(struct timeval *tv)
*/
API_EXPORTED size_t fp_get_pollfds(struct fp_pollfd **pollfds)
{
struct libusb_pollfd **usbfds;
struct libusb_pollfd *usbfd;
const struct libusb_pollfd **usbfds;
const struct libusb_pollfd *usbfd;
struct fp_pollfd *ret;
size_t cnt = 0;
size_t i = 0;