Changeset b801f2d in mainline


Ignore:
Timestamp:
2012-10-18T22:04:12Z (12 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5c90e3e
Parents:
0a586f4c
Message:

rtc: Add support to fun_offline() / fun_online()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/time/cmos-rtc/cmos-rtc.c

    r0a586f4c rb801f2d  
    100100static time_t uptime_get(void);
    101101static bool is_battery_ok(rtc_t *rtc);
     102static int  rtc_fun_online(ddf_fun_t *fun);
     103static int  rtc_fun_offline(ddf_fun_t *fun);
    102104
    103105static ddf_dev_ops_t rtc_dev_ops;
     
    107109        .dev_add = rtc_dev_add,
    108110        .dev_remove = rtc_dev_remove,
     111        .fun_online = rtc_fun_online,
     112        .fun_offline = rtc_fun_offline,
    109113};
    110114
     
    638642        fibril_mutex_unlock(&rtc->mutex);
    639643
     644        rc = rtc_fun_offline(rtc->fun);
     645        if (rc != EOK) {
     646                ddf_msg(LVL_ERROR, "Failed to offline function");
     647                return rc;
     648        }
     649
    640650        rc = ddf_fun_unbind(rtc->fun);
    641651        if (rc != EOK) {
     
    726736}
    727737
     738static int
     739rtc_fun_online(ddf_fun_t *fun)
     740{
     741        ddf_msg(LVL_DEBUG, "rtc_fun_online()");
     742        return ddf_fun_online(fun);
     743}
     744
     745static int
     746rtc_fun_offline(ddf_fun_t *fun)
     747{
     748        ddf_msg(LVL_DEBUG, "rtc_fun_offline()");
     749        return ddf_fun_offline(fun);
     750}
     751
    728752int
    729753main(int argc, char **argv)
Note: See TracChangeset for help on using the changeset viewer.