Changeset 128c78b in mainline for uspace/drv/char/ns8250/ns8250.c


Ignore:
Timestamp:
2011-09-17T21:04:47Z (13 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
dfa48b0d
Parents:
a281aec5
Message:

Add checks and documentation to interrupt-enabling code in the ns8250 driver.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/char/ns8250/ns8250.c

    ra281aec5 r128c78b  
    412412static int ns8250_interrupt_enable(ns8250_t *ns)
    413413{
     414        /*
     415         * Enable interrupt using IRC service.
     416         * TODO: This is a temporary solution until the device framework
     417         * takes care of this itself.
     418         */
    414419        async_sess_t *irc_sess = service_connect_blocking(EXCHANGE_SERIALIZE,
    415420            SERVICE_IRC, 0, 0);
     421        if (!irc_sess) {
     422                return EIO;
     423        }
    416424
    417425        async_exch_t *exch = async_exchange_begin(irc_sess);
     426        if (!exch) {
     427                return EIO;
     428        }
    418429        async_msg_1(exch, IRC_ENABLE_INTERRUPT, ns->irq);
    419430        async_exchange_end(exch);
Note: See TracChangeset for help on using the changeset viewer.