Changeset c0fdc0e in mainline
- Timestamp:
- 2011-12-11T18:17:47Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0681c06
- Parents:
- 7267fa1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/src/devdrv.c
r7267fa1 rc0fdc0e 170 170 return ENOTSUP; 171 171 /* Just tell the driver to stop whatever it is doing, keep structures */ 172 return driver->ops->device_rem(gen_dev->driver_data); 172 const int ret = driver->ops->device_rem(gen_dev->driver_data); 173 if (ret != EOK) 174 return ret; 175 return ENOTSUP; 173 176 } 174 177 /*----------------------------------------------------------------------------*/ … … 481 484 usb_dev->pipes = NULL; 482 485 486 /* Initialize hc connection. */ 483 487 usb_hc_connection_initialize_from_device(&usb_dev->hc_conn, ddf_dev); 484 488 const usb_address_t address = 485 489 usb_get_address_by_handle(ddf_dev->handle); 490 486 491 /* Initialize backing wire and control pipe. */ 487 492 int rc = usb_device_connection_initialize( … … 494 499 /* This pipe was registered by the hub driver, 495 500 * during device initialization. */ 496 rc = usb_pipe_initialize_default_control( &usb_dev->ctrl_pipe,497 &usb_dev-> wire);501 rc = usb_pipe_initialize_default_control( 502 &usb_dev->ctrl_pipe, &usb_dev->wire); 498 503 if (rc != EOK) { 499 504 *errstr_ptr = "default control pipe initialization"; 505 return rc; 506 } 507 508 rc = usb_hc_connection_open(&usb_dev->hc_conn); 509 if (rc != EOK) { 510 *errstr_ptr = "hc connection open"; 500 511 return rc; 501 512 } … … 503 514 /* Get our interface. */ 504 515 usb_dev->interface_no = usb_device_get_assigned_interface(ddf_dev); 505 506 516 /* Retrieve standard descriptors. */ 507 rc = usb_device_retrieve_descriptors( &usb_dev->ctrl_pipe,508 &usb_dev-> descriptors);517 rc = usb_device_retrieve_descriptors( 518 &usb_dev->ctrl_pipe, &usb_dev->descriptors); 509 519 if (rc != EOK) { 510 520 *errstr_ptr = "descriptor retrieval"; 521 usb_hc_connection_close(&usb_dev->hc_conn); 511 522 return rc; 512 523 } … … 525 536 rc = initialize_other_pipes(endpoints, usb_dev, alternate_iface); 526 537 if (rc != EOK) { 538 usb_hc_connection_close(&usb_dev->hc_conn); 527 539 /* Full configuration descriptor is allocated. */ 528 540 usb_device_release_descriptors(&usb_dev->descriptors); … … 533 545 } 534 546 547 usb_hc_connection_close(&usb_dev->hc_conn); 535 548 return EOK; 536 549 }
Note:
See TracChangeset
for help on using the changeset viewer.