Changeset 3bacee1 in mainline for uspace/drv/hid/usbhid


Ignore:
Timestamp:
2018-04-12T16:27:17Z (8 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3cf22f9
Parents:
76d0981d
git-author:
Jiri Svoboda <jiri@…> (2018-04-11 19:25:33)
git-committer:
Jiri Svoboda <jiri@…> (2018-04-12 16:27:17)
Message:

Make ccheck-fix again and commit more good files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/hid/usbhid/usbhid.c

    r76d0981d r3bacee1  
    123123            &usb_device_descriptors(hid_dev->usb_dev)->device;
    124124
    125         return (d->vendor_id == mapping->vendor_id)
    126             && (d->product_id == mapping->product_id);
     125        return (d->vendor_id == mapping->vendor_id) &&
     126            (d->product_id == mapping->product_id);
    127127}
    128128
     
    139139        }
    140140
    141         for (int i = 0; mapping->usage_path[i].usage != 0
    142             || mapping->usage_path[i].usage_page != 0; ++i) {
     141        for (int i = 0; mapping->usage_path[i].usage != 0 ||
     142            mapping->usage_path[i].usage_page != 0; ++i) {
    143143                if (usb_hid_report_path_append_item(usage_path,
    144144                    mapping->usage_path[i].usage_page,
     
    159159                if (report_id != 0) {
    160160                        usb_hid_report_path_set_report_id(usage_path,
    161                                 report_id);
     161                            report_id);
    162162                }
    163163
    164164                const usb_hid_report_field_t *field =
    165165                    usb_hid_report_get_sibling(
    166                         &hid_dev->report, NULL, usage_path, mapping->compare,
    167                         USB_HID_REPORT_TYPE_INPUT);
     166                    &hid_dev->report, NULL, usage_path, mapping->compare,
     167                    USB_HID_REPORT_TYPE_INPUT);
    168168
    169169                usb_log_debug("Field: %p", field);
     
    275275        static const struct {
    276276                const usb_endpoint_description_t *desc;
    277                 const char* description;
     277                const char *description;
    278278        } endpoints[] = {
    279                 {&usb_hid_kbd_poll_endpoint_description, "Keyboard endpoint"},
    280                 {&usb_hid_mouse_poll_endpoint_description, "Mouse endpoint"},
    281                 {&usb_hid_generic_poll_endpoint_description, "Generic HID endpoint"},
     279                { &usb_hid_kbd_poll_endpoint_description, "Keyboard endpoint" },
     280                { &usb_hid_mouse_poll_endpoint_description, "Mouse endpoint" },
     281                { &usb_hid_generic_poll_endpoint_description, "Generic HID endpoint" },
    282282        };
    283283
     
    305305                const size_t size =
    306306                    usb_hid_report_byte_size(&hid_dev->report, report_id,
    307                         USB_HID_REPORT_TYPE_INPUT);
     307                    USB_HID_REPORT_TYPE_INPUT);
    308308                usb_log_debug("Report ID: %u, size: %zu", report_id, size);
    309309                max_size = (size > max_size) ? size : max_size;
     
    492492        for (unsigned i = 0; i < hid_dev->subdriver_count; ++i) {
    493493                if (hid_dev->subdrivers[i].init != NULL) {
    494                         usb_log_debug("Initializing subdriver %d.",i);
     494                        usb_log_debug("Initializing subdriver %d.", i);
    495495                        const errno_t pret = hid_dev->subdrivers[i].init(hid_dev,
    496496                            &hid_dev->subdrivers[i].data);
Note: See TracChangeset for help on using the changeset viewer.