]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/rtc/pl031.c
dm: rtc: Rename mktime() and reduce the number of parameters
[karo-tx-uboot.git] / drivers / rtc / pl031.c
index 8b2b174aea66c3795ce2fdbd659bb8917b10eb52..fc83049ecd2ebcfed6e746a25d8edda92ace3a32 100644 (file)
@@ -4,23 +4,7 @@
  *
  * reference linux-2.6.20.6/drivers/rtc/rtc-pl031.c
  *
- * 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 <common.h>
@@ -88,8 +72,7 @@ int rtc_set(struct rtc_time *tmp)
        }
 
        /* Calculate number of seconds this incoming time represents */
-       tim = mktime(tmp->tm_year, tmp->tm_mon, tmp->tm_mday,
-                       tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
+       tim = rtc_mktime(tmp);
 
        RTC_WRITE_REG(RTC_LR, tim);
 
@@ -113,7 +96,7 @@ int rtc_get(struct rtc_time *tmp)
 
        tim = RTC_READ_REG(RTC_DR);
 
-       to_tm (tim, tmp);
+       rtc_to_tm(tim, tmp);
 
        debug ( "Get DATE: %4d-%02d-%02d (wday=%d)  TIME: %2d:%02d:%02d\n",
                tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday,