Changes in uspace/drv/hid/usbhid/generic/hiddev.c [5a6cc679:b7fd2a0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/hid/usbhid/generic/hiddev.c
r5a6cc679 rb7fd2a0 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). ",98 usb_log_debug2("hid_dev: %p, Max input report size (%zu).\n", 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. ");107 usb_log_debug2("Generic HID: Get event.\n"); 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) ",117 usb_log_debug("input_report_size > size (%zu, %zu)\n", 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 ");128 usb_log_debug2("OK\n"); 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. ");136 137 const usb_hid_dev_t *hid_dev = fun_hid_dev(fun); 138 139 usb_log_debug2("hid_dev->report_desc_size = %zu ",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", 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. ");148 usb_log_debug2("Generic HID: Get report descriptor.\n"); 149 149 150 150 const usb_hid_dev_t *hid_dev = fun_hid_dev(fun); … … 162 162 static errno_t usb_generic_hid_client_connected(ddf_fun_t *fun) 163 163 { 164 usb_log_debug("Generic HID: Client connected. ");164 usb_log_debug("Generic HID: Client connected.\n"); 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. ");175 usb_log_error("Failed to unbind generic hid fun.\n"); 176 176 return; 177 177 } 178 usb_log_debug2("%s unbound. ", ddf_fun_get_name(fun));178 usb_log_debug2("%s unbound.\n", 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... ", HID_GENERIC_FUN_NAME);191 usb_log_debug("Creating DDF function %s...\n", 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. ");195 usb_log_error("Could not create DDF function node.\n"); 196 196 return ENOMEM; 197 197 } … … 204 204 errno_t rc = ddf_fun_bind(fun); 205 205 if (rc != EOK) { 206 usb_log_error("Could not bind DDF function: %s. ",206 usb_log_error("Could not bind DDF function: %s.\n", 207 207 str_error(rc)); 208 208 ddf_fun_destroy(fun); … … 210 210 } 211 211 212 usb_log_debug("HID function created. Handle: %" PRIun " ",212 usb_log_debug("HID function created. Handle: %" PRIun "\n", 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. */222 221 return true; 223 222 }
Note:
See TracChangeset
for help on using the changeset viewer.