Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 8a01a0b in mainline


Ignore:
Timestamp:
2011-12-14T21:23:59Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
6883abfa
Parents:
0cfb05e
Message:

libusbdev: Remove unused parameters and variables.

Location:
uspace/lib/usbdev
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbdev/include/usb/dev/driver.h

    r0cfb05e r8a01a0b  
    176176    const usb_endpoint_description_t **, const uint8_t *, size_t, int, int,
    177177    usb_endpoint_mapping_t **, size_t *);
    178 int usb_device_destroy_pipes(const ddf_dev_t *, usb_endpoint_mapping_t *, size_t);
     178int usb_device_destroy_pipes(usb_endpoint_mapping_t *, size_t);
    179179
    180180void * usb_device_data_alloc(usb_device_t *, size_t);
  • uspace/lib/usbdev/src/devdrv.c

    r0cfb05e r8a01a0b  
    205205static int destroy_current_pipes(usb_device_t *dev)
    206206{
    207         int rc = usb_device_destroy_pipes(dev->ddf_dev,
    208             dev->pipes, dev->pipes_count);
     207        const int rc = usb_device_destroy_pipes(dev->pipes, dev->pipes_count);
    209208        if (rc != EOK) {
    210209                return rc;
     
    423422 * @param[in] pipes_count Number of endpoints.
    424423 */
    425 int usb_device_destroy_pipes(const ddf_dev_t *dev,
    426     usb_endpoint_mapping_t *pipes, size_t pipes_count)
    427 {
    428         assert(dev != NULL);
    429 
     424int usb_device_destroy_pipes(usb_endpoint_mapping_t *pipes, size_t pipes_count)
     425{
    430426        if (pipes_count == 0) {
    431427                assert(pipes == NULL);
     
    434430        assert(pipes != NULL);
    435431
    436         int rc;
    437 
    438         /* Prepare connection to HC to allow endpoint unregistering. */
    439         usb_hc_connection_t hc_conn;
    440         rc = usb_hc_connection_initialize_from_device(&hc_conn, dev);
    441         if (rc != EOK) {
    442                 return rc;
    443         }
    444         /* Open connection to hc for pipe unregister. */
    445         rc = usb_hc_connection_open(&hc_conn);
    446         if (rc != EOK) {
    447                 return rc;
    448         }
    449 
    450432        /* Destroy the pipes. */
    451         size_t i;
    452         for (i = 0; i < pipes_count; i++) {
    453                 usb_log_debug2("Unregistering pipe %zu (%spresent).\n",
     433        for (size_t i = 0; i < pipes_count; ++i) {
     434                usb_log_debug2("Unregistering pipe %zu: %spresent.\n",
    454435                    i, pipes[i].present ? "" : "not ");
    455436                if (pipes[i].present)
     
    457438        }
    458439
    459         usb_hc_connection_close(&hc_conn);
    460440        free(pipes);
    461441
Note: See TracChangeset for help on using the changeset viewer.