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

rtc: fix CLOCK_DEV protocol

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/device/clock_dev.c

    rf4ebaf3c rbfc5577a  
    4949clock_dev_time_get(async_sess_t *sess, struct tm *t)
    5050{
    51         ipc_call_t answer;
    5251        aid_t req;
    5352        int ret;
     
    5655
    5756        req = async_send_1(exch, DEV_IFACE_ID(CLOCK_DEV_IFACE),
    58             CLOCK_DEV_TIME_GET, &answer);
     57            CLOCK_DEV_TIME_GET, NULL);
    5958        ret = async_data_read_start(exch, t, sizeof(*t));
    6059
     
    6968
    7069        async_wait_for(req, &rc);
    71         if ((int) rc != EOK)
    72                 return ret;
    73 
    74         return (int) IPC_GET_ARG1(answer);
     70        return (int)rc;
    7571}
    7672
     
    8581clock_dev_time_set(async_sess_t *sess, struct tm *t)
    8682{
    87         ipc_call_t answer;
    8883        aid_t req;
    8984        int ret;
     
    9287
    9388        req = async_send_1(exch, DEV_IFACE_ID(CLOCK_DEV_IFACE),
    94             CLOCK_DEV_TIME_SET, &answer);
     89            CLOCK_DEV_TIME_SET, NULL);
    9590        ret = async_data_write_start(exch, t, sizeof(*t));
    9691
     
    105100
    106101        async_wait_for(req, &rc);
    107         if ((int) rc != EOK)
    108                 return ret;
    109 
    110         return (int) IPC_GET_ARG1(answer);
     102        return (int)rc;
    111103}
    112104
Note: See TracChangeset for help on using the changeset viewer.