Changes in uspace/drv/hid/usbhid/generic/hiddev.c [53b9f2c:a1732929] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/hid/usbhid/generic/hiddev.c
r53b9f2c ra1732929 96 96 const usb_hid_dev_t *hid_dev = fun_hid_dev(fun); 97 97 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).", 99 99 hid_dev, hid_dev->max_input_report_size); 100 100 … … 105 105 size_t size, size_t *act_size, int *event_nr, unsigned int flags) 106 106 { 107 usb_log_debug2("Generic HID: Get event. \n");107 usb_log_debug2("Generic HID: Get event."); 108 108 109 109 if (buffer == NULL || act_size == NULL || event_nr == NULL) { … … 115 115 116 116 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)", 118 118 hid_dev->input_report_size, size); 119 119 return EINVAL; // TODO: other error code … … 126 126 *event_nr = usb_hid_report_number(hid_dev); 127 127 128 usb_log_debug2("OK \n");128 usb_log_debug2("OK"); 129 129 130 130 return EOK; … … 133 133 static size_t usb_generic_get_report_descriptor_length(ddf_fun_t *fun) 134 134 { 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", 140 140 hid_dev->report_desc_size); 141 141 … … 146 146 size_t size, size_t *actual_size) 147 147 { 148 usb_log_debug2("Generic HID: Get report descriptor. \n");148 usb_log_debug2("Generic HID: Get report descriptor."); 149 149 150 150 const usb_hid_dev_t *hid_dev = fun_hid_dev(fun); … … 162 162 static int usb_generic_hid_client_connected(ddf_fun_t *fun) 163 163 { 164 usb_log_debug("Generic HID: Client connected. \n");164 usb_log_debug("Generic HID: Client connected."); 165 165 return EOK; 166 166 } … … 173 173 174 174 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."); 176 176 return; 177 177 } 178 usb_log_debug2("%s unbound. \n", ddf_fun_get_name(fun));178 usb_log_debug2("%s unbound.", ddf_fun_get_name(fun)); 179 179 ddf_fun_destroy(fun); 180 180 } … … 189 189 190 190 /* 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); 192 192 ddf_fun_t *fun = usb_device_ddf_fun_create(hid_dev->usb_dev, 193 193 fun_exposed, HID_GENERIC_FUN_NAME); 194 194 if (fun == NULL) { 195 usb_log_error("Could not create DDF function node. \n");195 usb_log_error("Could not create DDF function node."); 196 196 return ENOMEM; 197 197 } … … 204 204 int rc = ddf_fun_bind(fun); 205 205 if (rc != EOK) { 206 usb_log_error("Could not bind DDF function: %s. \n",206 usb_log_error("Could not bind DDF function: %s.", 207 207 str_error(rc)); 208 208 ddf_fun_destroy(fun); … … 210 210 } 211 211 212 usb_log_debug("HID function created. Handle: %" PRIun " \n",212 usb_log_debug("HID function created. Handle: %" PRIun "", 213 213 ddf_fun_get_handle(fun)); 214 214 *data = fun; … … 219 219 bool usb_generic_hid_polling_callback(usb_hid_dev_t *hid_dev, void *data) 220 220 { 221 /* Continue polling until the device is about to be removed. */ 221 222 return true; 222 223 }
Note:
See TracChangeset
for help on using the changeset viewer.