Lines Matching refs:rtc_tm
119 get_rtc_time(struct rtc_time *rtc_tm) in get_rtc_time() argument
125 rtc_tm->tm_sec = CMOS_READ(RTC_SECONDS); in get_rtc_time()
126 rtc_tm->tm_min = CMOS_READ(RTC_MINUTES); in get_rtc_time()
127 rtc_tm->tm_hour = CMOS_READ(RTC_HOURS); in get_rtc_time()
128 rtc_tm->tm_mday = CMOS_READ(RTC_DAY_OF_MONTH); in get_rtc_time()
129 rtc_tm->tm_mon = CMOS_READ(RTC_MONTH); in get_rtc_time()
130 rtc_tm->tm_year = CMOS_READ(RTC_YEAR); in get_rtc_time()
134 rtc_tm->tm_sec = bcd2bin(rtc_tm->tm_sec); in get_rtc_time()
135 rtc_tm->tm_min = bcd2bin(rtc_tm->tm_min); in get_rtc_time()
136 rtc_tm->tm_hour = bcd2bin(rtc_tm->tm_hour); in get_rtc_time()
137 rtc_tm->tm_mday = bcd2bin(rtc_tm->tm_mday); in get_rtc_time()
138 rtc_tm->tm_mon = bcd2bin(rtc_tm->tm_mon); in get_rtc_time()
139 rtc_tm->tm_year = bcd2bin(rtc_tm->tm_year); in get_rtc_time()
146 if (rtc_tm->tm_year <= 69) in get_rtc_time()
147 rtc_tm->tm_year += 100; in get_rtc_time()
149 rtc_tm->tm_mon--; in get_rtc_time()
164 struct rtc_time rtc_tm; in rtc_ioctl() local
166 memset(&rtc_tm, 0, sizeof (struct rtc_time)); in rtc_ioctl()
168 get_rtc_time(&rtc_tm); in rtc_ioctl()
170 if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time))) in rtc_ioctl()
177 struct rtc_time rtc_tm; in rtc_ioctl() local
184 if (copy_from_user(&rtc_tm, (struct rtc_time*)arg, sizeof(struct rtc_time))) in rtc_ioctl()
187 yrs = rtc_tm.tm_year + 1900; in rtc_ioctl()
188 mon = rtc_tm.tm_mon + 1; /* tm_mon starts at zero */ in rtc_ioctl()
189 day = rtc_tm.tm_mday; in rtc_ioctl()
190 hrs = rtc_tm.tm_hour; in rtc_ioctl()
191 min = rtc_tm.tm_min; in rtc_ioctl()
192 sec = rtc_tm.tm_sec; in rtc_ioctl()