Changes in uspace/drv/usbhid/hiddev.c [00b13408:206f71a] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhid/hiddev.c
r00b13408 r206f71a 158 158 } 159 159 160 hid_dev->report_desc_size = length;161 162 160 usb_log_debug("Done.\n"); 163 161 … … 264 262 265 263 if (rc != EOK) { 266 usb_log_warning("Problem with getting Report descriptor: %s.\n",264 usb_log_warning("Problem with parsing Report descriptor: %s.\n", 267 265 str_error(rc)); 268 266 return rc; 269 267 } 270 271 rc = usb_hid_parse_report_descriptor(hid_dev->parser,272 hid_dev->report_desc, hid_dev->report_desc_size);273 if (rc != EOK) {274 usb_log_warning("Problem parsing Report descriptor: %s.\n",275 str_error(rc));276 return rc;277 }278 279 usb_hid_descriptor_print(hid_dev->parser);280 268 281 269 return EOK; … … 301 289 302 290 memset(dev, 0, sizeof(usbhid_dev_t)); 303 304 dev->parser = (usb_hid_report_parser_t *)(malloc(sizeof(305 usb_hid_report_parser_t)));306 if (dev->parser == NULL) {307 usb_log_fatal("No memory!\n");308 free(dev);309 return NULL;310 }311 291 312 292 dev->initialized = 0; … … 419 399 420 400 /* 421 * Initialize the report parser.422 */423 rc = usb_hid_parser_init(hid_dev->parser);424 if (rc != EOK) {425 usb_log_error("Failed to initialize report parser.\n");426 return rc;427 }428 429 /*430 401 * Get descriptors, parse descriptors and save endpoints. 431 402 */ … … 440 411 if (rc != EOK) { 441 412 /* TODO: end session?? */ 442 usb_endpoint_pipe_end_session(&hid_dev->ctrl_pipe);443 413 usb_log_error("Failed to process descriptors: %s.\n", 444 414 str_error(rc));
Note:
See TracChangeset
for help on using the changeset viewer.