Changes in uspace/drv/usbhid/hiddev.c [206f71a:00b13408] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhid/hiddev.c
r206f71a r00b13408 158 158 } 159 159 160 hid_dev->report_desc_size = length; 161 160 162 usb_log_debug("Done.\n"); 161 163 … … 262 264 263 265 if (rc != EOK) { 264 usb_log_warning("Problem with parsing Report descriptor: %s.\n", 265 str_error(rc)); 266 return rc; 267 } 266 usb_log_warning("Problem with getting Report descriptor: %s.\n", 267 str_error(rc)); 268 return rc; 269 } 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); 268 280 269 281 return EOK; … … 289 301 290 302 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 } 291 311 292 312 dev->initialized = 0; … … 399 419 400 420 /* 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 /* 401 430 * Get descriptors, parse descriptors and save endpoints. 402 431 */ … … 411 440 if (rc != EOK) { 412 441 /* TODO: end session?? */ 442 usb_endpoint_pipe_end_session(&hid_dev->ctrl_pipe); 413 443 usb_log_error("Failed to process descriptors: %s.\n", 414 444 str_error(rc));
Note:
See TracChangeset
for help on using the changeset viewer.