Changeset 41924f30 in mainline for uspace/drv/bus/usb/xhci/main.c


Ignore:
Timestamp:
2017-10-12T14:07:27Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a5976973
Parents:
7e74911
Message:

WIP usbhost refactoring

This commit replaces callbacks with more systematic virtual-like inheritance-like solution. Currently breaks build of HelenOS, but both xhci and usbhost are buildable. More refactoring follows…

File:
1 edited

Legend:

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

    r7e74911 r41924f30  
    6666                .schedule       = hcd_schedule,
    6767                .irq_hook       = hcd_interrupt,
    68                 .ep_add_hook    = endpoint_init,
    69                 .ep_remove_hook = endpoint_fini,
    7068                .status_hook    = hcd_status,
    7169        }
     
    8381                goto err;
    8482
     83        if ((err = xhci_bus_init(&hc->bus, hcd)))
     84                goto err;
     85
    8586        if ((err = hc_init_memory(hc)))
    8687                goto err;
    8788
    88         hcd_set_implementation(hcd, hc, &xhci_ddf_hc_driver.ops);
     89        hcd_set_implementation(hcd, hc, &xhci_ddf_hc_driver.ops, &hc->bus.base);
    8990
    9091        return EOK;
Note: See TracChangeset for help on using the changeset viewer.