mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-19 11:24:42 +00:00
rtc: export rtc_month_days()
Export function rtc_month_days() for reuse in the UEFI subsystem. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
parent
a248bc8055
commit
3c1889e639
2 changed files with 9 additions and 1 deletions
|
@ -23,7 +23,7 @@ static const unsigned char rtc_days_in_month[] = {
|
||||||
/*
|
/*
|
||||||
* The number of days in the 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);
|
return rtc_days_in_month[month] + (is_leap_year(year) && month == 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -258,4 +258,12 @@ void rtc_to_tm(u64 time_t, struct rtc_time *time);
|
||||||
*/
|
*/
|
||||||
unsigned long rtc_mktime(const 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_ */
|
#endif /* _RTC_H_ */
|
||||||
|
|
Loading…
Add table
Reference in a new issue