Changeset b5f813c in mainline for uspace/lib/usbhost/src/ddf_helpers.c


Ignore:
Timestamp:
2015-07-04T03:28:02Z (9 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
55346870
Parents:
2dbfe44
Message:

libusbhost,ehci,ohci,uhci,vhc: Pass ops structure instead of function pointers to intialization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/src/ddf_helpers.c

    r2dbfe44 rb5f813c  
    690690}
    691691
     692//TODO: Move this to generic ddf?
    692693int hcd_ddf_get_registers(ddf_dev_t *device, hw_res_list_parsed_t *hw_res)
    693694{
     
    779780        assert(dev);
    780781        hcd_t *hcd = dev_to_hcd(dev);
    781         if (!hcd || !hcd->driver.irq_hook) {
     782        if (!hcd || !hcd->ops.irq_hook) {
    782783                usb_log_error("Interrupt on not yet initialized device.\n");
    783784                return;
    784785        }
    785786        const uint32_t status = IPC_GET_ARG1(*call);
    786         hcd->driver.irq_hook(hcd, status);
     787        hcd->ops.irq_hook(hcd, status);
    787788}
    788789
     
    791792        hcd_t *hcd = arg;
    792793        assert(hcd);
    793         if (!hcd->driver.status_hook || !hcd->driver.irq_hook)
     794        if (!hcd->ops.status_hook || !hcd->ops.irq_hook)
    794795                return ENOTSUP;
    795796        uint32_t status = 0;
    796         while (hcd->driver.status_hook(hcd, &status) == EOK) {
    797                 hcd->driver.irq_hook(hcd, status);
     797        while (hcd->ops.status_hook(hcd, &status) == EOK) {
     798                hcd->ops.irq_hook(hcd, status);
    798799                status = 0;
    799800                /* We should wait 1 frame - 1ms here, but this polling is a
     
    885886
    886887        /* Need working irq replacement to setup root hub */
    887         if ((irq < 0) && hcd->driver.status_hook) {
     888        if ((irq < 0) && hcd->ops.status_hook) {
    888889                hcd->polling_fibril = fibril_create(interrupt_polling, hcd);
    889890                if (hcd->polling_fibril == 0) {
Note: See TracChangeset for help on using the changeset viewer.