Changeset 9d4c1b6 in mainline for uspace/drv/bus/usb/ohci/ohci.c


Ignore:
Timestamp:
2011-07-12T20:12:31Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fc6e607
Parents:
408d3c9
Message:

OHCI: Fix validity check in interrupt handler.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ohci/ohci.c

    r408d3c9 r9d4c1b6  
    6868static void irq_handler(ddf_dev_t *dev, ipc_callid_t iid, ipc_call_t *call)
    6969{
    70         hc_t *hc = &dev_to_ohci(dev)->hc;
    71         if (!hc) {
    72                 usb_log_warning("IRQ on device that is not ready.\n");
     70        assert(dev);
     71
     72        ohci_t *ohci = dev_to_ohci(dev);
     73        if (!ohci) {
     74                usb_log_warning("Interrupt on device that is not ready.\n");
    7375                return;
    7476        }
    7577        const uint16_t status = IPC_GET_ARG1(*call);
    76         hc_interrupt(hc, status);
     78        hc_interrupt(&ohci->hc, status);
    7779}
    7880/*----------------------------------------------------------------------------*/
Note: See TracChangeset for help on using the changeset viewer.