Changeset 945d66c in mainline for uspace/drv/bus/usb/usbmid/explore.c


Ignore:
Timestamp:
2013-01-25T22:55:22Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9e79a2f
Parents:
c39e9fb
Message:

libusbdev: Don't use the descriptor field directly.

Make descriptor handling functions static.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbmid/explore.c

    rc39e9fb r945d66c  
    118118                usbmid_interface_t *iface = NULL;
    119119                const int rc = usbmid_spawn_interface_child(usb_dev, &iface,
    120                     &usb_dev->descriptors.device, interface);
     120                        usb_device_get_device_descriptor(usb_dev), interface);
    121121                if (rc != EOK) {
    122122                        //TODO: Do something about that failure.
     
    142142int usbmid_explore_device(usb_device_t *dev)
    143143{
    144         const unsigned dev_class = dev->descriptors.device.device_class;
     144        const unsigned dev_class =
     145            usb_device_get_device_descriptor(dev)->device_class;
    145146        if (dev_class != USB_CLASS_USE_INTERFACE) {
    146147                usb_log_warning(
     
    152153        }
    153154
    154         /* Shortcuts to save on typing ;-). */
    155         const void *config_descriptor_raw = dev->descriptors.configuration;
    156         size_t config_descriptor_size = dev->descriptors.configuration_size;
     155        /* Get coonfiguration descriptor. */
     156        size_t config_descriptor_size = 0;
     157        const void *config_descriptor_raw =
     158            usb_device_get_configuration_descriptor(dev,
     159            &config_descriptor_size);
    157160        const usb_standard_configuration_descriptor_t *config_descriptor =
    158161            config_descriptor_raw;
Note: See TracChangeset for help on using the changeset viewer.