Changes in uspace/drv/time/cmos-rtc/cmos-rtc.c [cde999a:b7fd2a0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/time/cmos-rtc/cmos-rtc.c
rcde999a rb7fd2a0 80 80 static rtc_t *dev_rtc(ddf_dev_t *dev); 81 81 static rtc_t *fun_rtc(ddf_fun_t *fun); 82 static int82 static errno_t 83 83 rtc_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);84 static errno_t rtc_time_get(ddf_fun_t *fun, struct tm *t); 85 static errno_t rtc_time_set(ddf_fun_t *fun, struct tm *t); 86 static errno_t rtc_dev_add(ddf_dev_t *dev); 87 static errno_t rtc_dev_initialize(rtc_t *rtc); 88 88 static bool rtc_pio_enable(rtc_t *rtc); 89 89 static void rtc_dev_cleanup(rtc_t *rtc); 90 static int rtc_open(ddf_fun_t *fun);90 static errno_t rtc_open(ddf_fun_t *fun); 91 91 static void rtc_close(ddf_fun_t *fun); 92 92 static bool rtc_update_in_progress(rtc_t *rtc); … … 94 94 static unsigned bcd2bin(unsigned bcd); 95 95 static unsigned bin2bcd(unsigned binary); 96 static int rtc_dev_remove(ddf_dev_t *dev);96 static errno_t rtc_dev_remove(ddf_dev_t *dev); 97 97 static void rtc_register_write(rtc_t *rtc, int reg, int data); 98 98 static 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);99 static errno_t rtc_fun_online(ddf_fun_t *fun); 100 static errno_t rtc_fun_offline(ddf_fun_t *fun); 101 101 102 102 static ddf_dev_ops_t rtc_dev_ops; … … 192 192 * @return EOK on success or an error code 193 193 */ 194 static int194 static errno_t 195 195 rtc_dev_initialize(rtc_t *rtc) 196 196 { 197 int rc;197 errno_t rc; 198 198 size_t i; 199 199 hw_resource_t *res; … … 316 316 * @return EOK on success or an error code 317 317 */ 318 static int318 static errno_t 319 319 rtc_time_get(ddf_fun_t *fun, struct tm *t) 320 320 { … … 412 412 /* Try to normalize the content of the tm structure */ 413 413 time_t r = mktime(t); 414 int result;414 errno_t result; 415 415 416 416 if (r < 0) … … 438 438 * @return EOK or an error code 439 439 */ 440 static int440 static errno_t 441 441 rtc_time_set(ddf_fun_t *fun, struct tm *t) 442 442 { … … 546 546 * @return EOK on success or an error code 547 547 */ 548 static int548 static errno_t 549 549 rtc_battery_status_get(ddf_fun_t *fun, battery_status_t *status) 550 550 { … … 579 579 * @return EOK on success or an error code 580 580 */ 581 static int581 static errno_t 582 582 rtc_dev_add(ddf_dev_t *dev) 583 583 { 584 584 rtc_t *rtc; 585 585 ddf_fun_t *fun = NULL; 586 int rc;586 errno_t rc; 587 587 bool need_cleanup = false; 588 588 … … 645 645 * @return EOK on success or an error code 646 646 */ 647 static int647 static errno_t 648 648 rtc_dev_remove(ddf_dev_t *dev) 649 649 { 650 650 rtc_t *rtc = dev_rtc(dev); 651 int rc;651 errno_t rc; 652 652 653 653 fibril_mutex_lock(&rtc->mutex); … … 684 684 * @return EOK on success or an error code 685 685 */ 686 static int686 static errno_t 687 687 rtc_open(ddf_fun_t *fun) 688 688 { 689 int rc;689 errno_t rc; 690 690 rtc_t *rtc = fun_rtc(fun); 691 691 … … 744 744 } 745 745 746 static int746 static errno_t 747 747 rtc_fun_online(ddf_fun_t *fun) 748 748 { 749 int rc;749 errno_t rc; 750 750 751 751 ddf_msg(LVL_DEBUG, "rtc_fun_online()"); … … 758 758 } 759 759 760 static int760 static errno_t 761 761 rtc_fun_offline(ddf_fun_t *fun) 762 762 {
Note:
See TracChangeset
for help on using the changeset viewer.