]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
rtc: export rtc_month_days()
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Fri, 31 May 2019 05:21:03 +0000 (07:21 +0200)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Fri, 31 May 2019 21:27:12 +0000 (23:27 +0200)
Export function rtc_month_days() for reuse in the UEFI subsystem.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
drivers/rtc/rtc-lib.c
include/rtc.h

index 6528ddfebb4d033a7aafa983f78e3e0edae61057..1f7bdade298a05f1e9b633ca319b078dc4058ab8 100644 (file)
@@ -23,7 +23,7 @@ static const unsigned char rtc_days_in_month[] = {
 /*
  * The number of days in the month.
  */
-static int rtc_month_days(unsigned int month, unsigned int year)
+int rtc_month_days(unsigned int month, unsigned int year)
 {
        return rtc_days_in_month[month] + (is_leap_year(year) && month == 1);
 }
index 2c3a5743e301e0ffbdfc48331828eee7cf4ed678..b255bdc7a3311017f65e0e62e937808b92a52c51 100644 (file)
@@ -258,4 +258,12 @@ void rtc_to_tm(u64 time_t, struct rtc_time *time);
  */
 unsigned long rtc_mktime(const struct rtc_time *time);
 
+/**
+ * rtc_month_days() - The number of days in the month
+ *
+ * @month:     month (January = 0)
+ * @year:      year (4 digits)
+ */
+int rtc_month_days(unsigned int month, unsigned int year);
+
 #endif /* _RTC_H_ */