Changeset 25696fea in mainline for uspace/lib/usbdev/src/altiface.c


Ignore:
Timestamp:
2011-10-15T20:05:00Z (13 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
22ceff3a
Parents:
1ccc32f (diff), 721d4b6e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge with mainline

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbdev/src/altiface.c

    r1ccc32f r25696fea  
    4848 * @return Number of alternate interfaces for @p interface_no interface.
    4949 */
    50 size_t usb_interface_count_alternates(uint8_t *config_descr,
     50size_t usb_interface_count_alternates(const uint8_t *config_descr,
    5151    size_t config_descr_size, uint8_t interface_no)
    5252{
     
    5454        assert(config_descr_size > 0);
    5555
    56         usb_dp_parser_t dp_parser = {
     56        const usb_dp_parser_t dp_parser = {
    5757                .nesting = usb_dp_standard_descriptor_nesting
    5858        };
    59         usb_dp_parser_data_t dp_data = {
     59        const usb_dp_parser_data_t dp_data = {
    6060                .data = config_descr,
    6161                .size = config_descr_size,
     
    6565        size_t alternate_count = 0;
    6666
    67         uint8_t *iface_ptr = usb_dp_get_nested_descriptor(&dp_parser,
     67        const uint8_t *iface_ptr = usb_dp_get_nested_descriptor(&dp_parser,
    6868            &dp_data, config_descr);
    6969        while (iface_ptr != NULL) {
     
    9090 * @return Error code.
    9191 */
    92 int usb_alternate_interfaces_create(uint8_t *config_descr,
     92int usb_alternate_interfaces_create(const uint8_t *config_descr,
    9393    size_t config_descr_size, int interface_number,
    9494    usb_alternate_interfaces_t **alternates_ptr)
     
    140140            = &alternates->alternatives[0];
    141141
    142         uint8_t *iface_ptr = usb_dp_get_nested_descriptor(&dp_parser,
     142        const uint8_t *iface_ptr = usb_dp_get_nested_descriptor(&dp_parser,
    143143            &dp_data, dp_data.data);
    144144        while (iface_ptr != NULL) {
     
    160160                    dp_data.data, iface_ptr);
    161161                if (iface_ptr == NULL) {
    162                         uint8_t *next = dp_data.data + dp_data.size;
     162                        const uint8_t *next = dp_data.data + dp_data.size;
    163163                        cur_alt_iface->nested_descriptors_size
    164164                            = next - cur_alt_iface->nested_descriptors;
Note: See TracChangeset for help on using the changeset viewer.