Lines Matching refs:wtime
278 struct rtc_time wtime; in gen_rtc_ioctl() local
306 memset(&wtime, 0, sizeof(wtime)); in gen_rtc_ioctl()
307 get_rtc_time(&wtime); in gen_rtc_ioctl()
309 return copy_to_user((void *)arg, &wtime, sizeof(wtime)) ? -EFAULT : 0; in gen_rtc_ioctl()
319 if (copy_from_user(&wtime, (struct rtc_time *)arg, in gen_rtc_ioctl()
320 sizeof(wtime))) in gen_rtc_ioctl()
323 year = wtime.tm_year + 1900; in gen_rtc_ioctl()
327 if ((wtime.tm_mon < 0 || wtime.tm_mon > 11) || (wtime.tm_mday < 1)) in gen_rtc_ioctl()
330 if (wtime.tm_mday < 0 || wtime.tm_mday > in gen_rtc_ioctl()
331 (days_in_mo[wtime.tm_mon] + ((wtime.tm_mon == 1) && leap_yr))) in gen_rtc_ioctl()
334 if (wtime.tm_hour < 0 || wtime.tm_hour >= 24 || in gen_rtc_ioctl()
335 wtime.tm_min < 0 || wtime.tm_min >= 60 || in gen_rtc_ioctl()
336 wtime.tm_sec < 0 || wtime.tm_sec >= 60) in gen_rtc_ioctl()
339 return set_rtc_time(&wtime); in gen_rtc_ioctl()