X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Frtc%2Fmc13xxx-rtc.c;h=3e463368b09c864c7c05e8ef30d983cc8645193a;hb=fbd8179cbadd44a9a45ef3eff7c2b5b5aa56938a;hp=e79f4621d3f9e8157e5861b3382a91181031b4dc;hpb=96764df1b47ddebfb50fadf5af72530b07b5fc89;p=u-boot diff --git a/drivers/rtc/mc13xxx-rtc.c b/drivers/rtc/mc13xxx-rtc.c index e79f4621d3..3e463368b0 100644 --- a/drivers/rtc/mc13xxx-rtc.c +++ b/drivers/rtc/mc13xxx-rtc.c @@ -1,23 +1,7 @@ /* * Copyright (C) 2008, Guennadi Liakhovetski * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA + * SPDX-License-Identifier: GPL-2.0+ */ #include @@ -52,7 +36,7 @@ int rtc_get(struct rtc_time *rtc) tim = day1 * 86400 + time; - to_tm(tim, rtc); + rtc_to_tm(tim, rtc); rtc->tm_yday = 0; rtc->tm_isdst = 0; @@ -67,8 +51,7 @@ int rtc_set(struct rtc_time *rtc) if (!p) return -1; - time = mktime(rtc->tm_year, rtc->tm_mon, rtc->tm_mday, - rtc->tm_hour, rtc->tm_min, rtc->tm_sec); + time = rtc_mktime(rtc); day = time / 86400; time %= 86400;