Changeset 63431db in mainline


Ignore:
Timestamp:
2018-01-07T01:15:24Z (6 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5e2b1ae6
Parents:
56257ba
Message:

xhci: remove unnecessary field

Location:
uspace/drv/bus/usb/xhci
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/xhci/hc.c

    r56257ba r63431db  
    215215                goto err_cmd;
    216216
    217         if ((err = xhci_rh_init(&hc->rh, hc, device)))
     217        if ((err = xhci_rh_init(&hc->rh, hc)))
    218218                goto err_bus;
    219219
  • uspace/drv/bus/usb/xhci/rh.c

    r56257ba r63431db  
    6161        XHCI_REG_MASK(XHCI_PORT_CEC);
    6262
    63 int xhci_rh_init(xhci_rh_t *rh, xhci_hc_t *hc, ddf_dev_t *device)
     63int xhci_rh_init(xhci_rh_t *rh, xhci_hc_t *hc)
    6464{
    6565        assert(rh);
     
    6969        rh->max_ports = XHCI_REG_RD(hc->cap_regs, XHCI_CAP_MAX_PORTS);
    7070        rh->devices_by_port = (xhci_device_t **) calloc(rh->max_ports, sizeof(xhci_device_t *));
    71         rh->hc_device = device;
    7271
    7372        const int err = bus_device_init(&rh->device.base, &rh->hc->bus.base);
     
    8887        int err;
    8988        assert(rh);
    90         assert(rh->hc_device);
    9189
    9290        assert(rh->devices_by_port[port_id - 1] == NULL);
     
    353351int xhci_rh_fini(xhci_rh_t *rh)
    354352{
    355         /* TODO: Implement me! */
    356         usb_log_debug2("Called xhci_rh_fini().");
    357 
     353        assert(rh);
    358354        free(rh->devices_by_port);
    359 
    360355        return EOK;
    361356}
  • uspace/drv/bus/usb/xhci/rh.h

    r56257ba r63431db  
    6767        xhci_device_t device;
    6868
    69         /* We need this to attach children to */
    70         ddf_dev_t *hc_device;
    71 
    7269        /** Interrupt transfer waiting for an actual interrupt to occur */
    7370        usb_transfer_batch_t *unfinished_interrupt_transfer;
     
    8077} xhci_rh_t;
    8178
    82 int xhci_rh_init(xhci_rh_t *, xhci_hc_t *, ddf_dev_t *);
     79int xhci_rh_init(xhci_rh_t *, xhci_hc_t *);
    8380int xhci_rh_fini(xhci_rh_t *);
    8481const xhci_port_speed_t *xhci_rh_get_port_speed(xhci_rh_t *, uint8_t);
Note: See TracChangeset for help on using the changeset viewer.