Ignore:
File:
1 edited

Legend:

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

    r53b9f2c ra1732929  
    9696        const usb_hid_dev_t *hid_dev = fun_hid_dev(fun);
    9797
    98         usb_log_debug2("hid_dev: %p, Max input report size (%zu).\n",
     98        usb_log_debug2("hid_dev: %p, Max input report size (%zu).",
    9999            hid_dev, hid_dev->max_input_report_size);
    100100
     
    105105    size_t size, size_t *act_size, int *event_nr, unsigned int flags)
    106106{
    107         usb_log_debug2("Generic HID: Get event.\n");
     107        usb_log_debug2("Generic HID: Get event.");
    108108
    109109        if (buffer == NULL || act_size == NULL || event_nr == NULL) {
     
    115115
    116116        if (hid_dev->input_report_size > size) {
    117                 usb_log_debug("input_report_size > size (%zu, %zu)\n",
     117                usb_log_debug("input_report_size > size (%zu, %zu)",
    118118                    hid_dev->input_report_size, size);
    119119                return EINVAL;  // TODO: other error code
     
    126126        *event_nr = usb_hid_report_number(hid_dev);
    127127
    128         usb_log_debug2("OK\n");
     128        usb_log_debug2("OK");
    129129
    130130        return EOK;
     
    133133static size_t usb_generic_get_report_descriptor_length(ddf_fun_t *fun)
    134134{
    135         usb_log_debug("Generic HID: Get report descriptor length.\n");
    136 
    137         const usb_hid_dev_t *hid_dev = fun_hid_dev(fun);
    138 
    139         usb_log_debug2("hid_dev->report_desc_size = %zu\n",
     135        usb_log_debug("Generic HID: Get report descriptor length.");
     136
     137        const usb_hid_dev_t *hid_dev = fun_hid_dev(fun);
     138
     139        usb_log_debug2("hid_dev->report_desc_size = %zu",
    140140            hid_dev->report_desc_size);
    141141
     
    146146    size_t size, size_t *actual_size)
    147147{
    148         usb_log_debug2("Generic HID: Get report descriptor.\n");
     148        usb_log_debug2("Generic HID: Get report descriptor.");
    149149
    150150        const usb_hid_dev_t *hid_dev = fun_hid_dev(fun);
     
    162162static int usb_generic_hid_client_connected(ddf_fun_t *fun)
    163163{
    164         usb_log_debug("Generic HID: Client connected.\n");
     164        usb_log_debug("Generic HID: Client connected.");
    165165        return EOK;
    166166}
     
    173173
    174174        if (ddf_fun_unbind(fun) != EOK) {
    175                 usb_log_error("Failed to unbind generic hid fun.\n");
     175                usb_log_error("Failed to unbind generic hid fun.");
    176176                return;
    177177        }
    178         usb_log_debug2("%s unbound.\n", ddf_fun_get_name(fun));
     178        usb_log_debug2("%s unbound.", ddf_fun_get_name(fun));
    179179        ddf_fun_destroy(fun);
    180180}
     
    189189
    190190        /* Create the exposed function. */
    191         usb_log_debug("Creating DDF function %s...\n", HID_GENERIC_FUN_NAME);
     191        usb_log_debug("Creating DDF function %s...", HID_GENERIC_FUN_NAME);
    192192        ddf_fun_t *fun = usb_device_ddf_fun_create(hid_dev->usb_dev,
    193193            fun_exposed, HID_GENERIC_FUN_NAME);
    194194        if (fun == NULL) {
    195                 usb_log_error("Could not create DDF function node.\n");
     195                usb_log_error("Could not create DDF function node.");
    196196                return ENOMEM;
    197197        }
     
    204204        int rc = ddf_fun_bind(fun);
    205205        if (rc != EOK) {
    206                 usb_log_error("Could not bind DDF function: %s.\n",
     206                usb_log_error("Could not bind DDF function: %s.",
    207207                    str_error(rc));
    208208                ddf_fun_destroy(fun);
     
    210210        }
    211211
    212         usb_log_debug("HID function created. Handle: %" PRIun "\n",
     212        usb_log_debug("HID function created. Handle: %" PRIun "",
    213213            ddf_fun_get_handle(fun));
    214214        *data = fun;
     
    219219bool usb_generic_hid_polling_callback(usb_hid_dev_t *hid_dev, void *data)
    220220{
     221        /* Continue polling until the device is about to be removed. */
    221222        return true;
    222223}
Note: See TracChangeset for help on using the changeset viewer.