Ignore:
Timestamp:
2018-01-09T18:25:56Z (6 years ago)
Author:
Petr Manek <petr.manek@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4793023
Parents:
c386d6d
Message:

usbhid: join polling fibrils in device_remove()

File:
1 edited

Legend:

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

    rc386d6d r970f6e1  
    165165}
    166166
    167 static bool usb_mouse_process_report(usb_hid_dev_t *hid_dev,
     167static void usb_mouse_process_report(usb_hid_dev_t *hid_dev,
    168168    usb_mouse_t *mouse_dev)
    169169{
     
    172172        if (mouse_dev->mouse_sess == NULL) {
    173173                usb_log_warning(NAME " No console session.\n");
    174                 return true;
     174                return;
    175175        }
    176176
     
    191191        if (absolute_x != absolute_y) {
    192192                usb_log_error(NAME " cannot handle mix of absolute and relative mouse move.");
    193                 return true;
     193                return;
    194194        }
    195195
     
    226226        if (path == NULL) {
    227227                usb_log_warning("Failed to create USB HID report path.\n");
    228                 return true;
     228                return;
    229229        }
    230230        int ret =
     
    233233                usb_hid_report_path_free(path);
    234234                usb_log_warning("Failed to add buttons to report path.\n");
    235                 return true;
     235                return;
    236236        }
    237237        usb_hid_report_path_set_report_id(path, hid_dev->report_id);
     
    266266
    267267        usb_hid_report_path_free(path);
    268 
    269         return true;
    270268}
    271269
     
    414412
    415413        usb_mouse_t *mouse_dev = data;
    416 
    417         return usb_mouse_process_report(hid_dev, mouse_dev);
     414        usb_mouse_process_report(hid_dev, mouse_dev);
     415
     416        /* Continue polling until the device is about to be removed. */
     417        return !hid_dev->will_deinit;
    418418}
    419419
Note: See TracChangeset for help on using the changeset viewer.