Ignore:
File:
1 edited

Legend:

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

    rcde999a rb7fd2a0  
    8080static rtc_t *dev_rtc(ddf_dev_t *dev);
    8181static rtc_t *fun_rtc(ddf_fun_t *fun);
    82 static int
     82static errno_t
    8383rtc_battery_status_get(ddf_fun_t *fun, battery_status_t *status);
    84 static int  rtc_time_get(ddf_fun_t *fun, struct tm *t);
    85 static int  rtc_time_set(ddf_fun_t *fun, struct tm *t);
    86 static int  rtc_dev_add(ddf_dev_t *dev);
    87 static int  rtc_dev_initialize(rtc_t *rtc);
     84static errno_t  rtc_time_get(ddf_fun_t *fun, struct tm *t);
     85static errno_t  rtc_time_set(ddf_fun_t *fun, struct tm *t);
     86static errno_t  rtc_dev_add(ddf_dev_t *dev);
     87static errno_t  rtc_dev_initialize(rtc_t *rtc);
    8888static bool rtc_pio_enable(rtc_t *rtc);
    8989static void rtc_dev_cleanup(rtc_t *rtc);
    90 static int  rtc_open(ddf_fun_t *fun);
     90static errno_t  rtc_open(ddf_fun_t *fun);
    9191static void rtc_close(ddf_fun_t *fun);
    9292static bool rtc_update_in_progress(rtc_t *rtc);
     
    9494static unsigned bcd2bin(unsigned bcd);
    9595static unsigned bin2bcd(unsigned binary);
    96 static int rtc_dev_remove(ddf_dev_t *dev);
     96static errno_t rtc_dev_remove(ddf_dev_t *dev);
    9797static void rtc_register_write(rtc_t *rtc, int reg, int data);
    9898static bool is_battery_ok(rtc_t *rtc);
    99 static int  rtc_fun_online(ddf_fun_t *fun);
    100 static int  rtc_fun_offline(ddf_fun_t *fun);
     99static errno_t  rtc_fun_online(ddf_fun_t *fun);
     100static errno_t  rtc_fun_offline(ddf_fun_t *fun);
    101101
    102102static ddf_dev_ops_t rtc_dev_ops;
     
    192192 * @return  EOK on success or an error code
    193193 */
    194 static int
     194static errno_t
    195195rtc_dev_initialize(rtc_t *rtc)
    196196{
    197         int rc;
     197        errno_t rc;
    198198        size_t i;
    199199        hw_resource_t *res;
     
    316316 * @return  EOK on success or an error code
    317317 */
    318 static int
     318static errno_t
    319319rtc_time_get(ddf_fun_t *fun, struct tm *t)
    320320{
     
    412412        /* Try to normalize the content of the tm structure */
    413413        time_t r = mktime(t);
    414         int result;
     414        errno_t result;
    415415
    416416        if (r < 0)
     
    438438 * @return  EOK or an error code
    439439 */
    440 static int
     440static errno_t
    441441rtc_time_set(ddf_fun_t *fun, struct tm *t)
    442442{
     
    546546 * @return       EOK on success or an error code
    547547 */
    548 static int
     548static errno_t
    549549rtc_battery_status_get(ddf_fun_t *fun, battery_status_t *status)
    550550{
     
    579579 * @return  EOK on success or an error code
    580580 */
    581 static int
     581static errno_t
    582582rtc_dev_add(ddf_dev_t *dev)
    583583{
    584584        rtc_t *rtc;
    585585        ddf_fun_t *fun = NULL;
    586         int rc;
     586        errno_t rc;
    587587        bool need_cleanup = false;
    588588
     
    645645 * @return      EOK on success or an error code
    646646 */
    647 static int
     647static errno_t
    648648rtc_dev_remove(ddf_dev_t *dev)
    649649{
    650650        rtc_t *rtc = dev_rtc(dev);
    651         int rc;
     651        errno_t rc;
    652652
    653653        fibril_mutex_lock(&rtc->mutex);
     
    684684 * @return  EOK on success or an error code
    685685 */
    686 static int
     686static errno_t
    687687rtc_open(ddf_fun_t *fun)
    688688{
    689         int rc;
     689        errno_t rc;
    690690        rtc_t *rtc = fun_rtc(fun);
    691691
     
    744744}
    745745
    746 static int
     746static errno_t
    747747rtc_fun_online(ddf_fun_t *fun)
    748748{
    749         int rc;
     749        errno_t rc;
    750750
    751751        ddf_msg(LVL_DEBUG, "rtc_fun_online()");
     
    758758}
    759759
    760 static int
     760static errno_t
    761761rtc_fun_offline(ddf_fun_t *fun)
    762762{
Note: See TracChangeset for help on using the changeset viewer.