projects
/
linux-drm-fsl-dcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
x86: Fix vrtc_get_time/set_mmss to use new timespec interface
[linux-drm-fsl-dcu.git]
/
arch
/
x86
/
platform
/
mrst
/
vrtc.c
diff --git
a/arch/x86/platform/mrst/vrtc.c
b/arch/x86/platform/mrst/vrtc.c
index d62b0a3b5c145abf837e52e028dcf39bf923e096..5e355b134ba49043b63d9acda6e549fa3d6420e1 100644
(file)
--- a/
arch/x86/platform/mrst/vrtc.c
+++ b/
arch/x86/platform/mrst/vrtc.c
@@
-56,7
+56,7
@@
void vrtc_cmos_write(unsigned char val, unsigned char reg)
}
EXPORT_SYMBOL_GPL(vrtc_cmos_write);
}
EXPORT_SYMBOL_GPL(vrtc_cmos_write);
-
unsigned long vrtc_get_time(void
)
+
void vrtc_get_time(struct timespec *now
)
{
u8 sec, min, hour, mday, mon;
unsigned long flags;
{
u8 sec, min, hour, mday, mon;
unsigned long flags;
@@
-82,17
+82,18
@@
unsigned long vrtc_get_time(void)
printk(KERN_INFO "vRTC: sec: %d min: %d hour: %d day: %d "
"mon: %d year: %d\n", sec, min, hour, mday, mon, year);
printk(KERN_INFO "vRTC: sec: %d min: %d hour: %d day: %d "
"mon: %d year: %d\n", sec, min, hour, mday, mon, year);
- return mktime(year, mon, mday, hour, min, sec);
+ now->tv_sec = mktime(year, mon, mday, hour, min, sec);
+ now->tv_nsec = 0;
}
}
-int vrtc_set_mmss(
unsigned long nowtime
)
+int vrtc_set_mmss(
const struct timespec *now
)
{
unsigned long flags;
struct rtc_time tm;
int year;
int retval = 0;
{
unsigned long flags;
struct rtc_time tm;
int year;
int retval = 0;
- rtc_time_to_tm(now
time
, &tm);
+ rtc_time_to_tm(now
->tv_sec
, &tm);
if (!rtc_valid_tm(&tm) && tm.tm_year >= 72) {
/*
* tm.year is the number of years since 1900, and the
if (!rtc_valid_tm(&tm) && tm.tm_year >= 72) {
/*
* tm.year is the number of years since 1900, and the
@@
-110,7
+111,7
@@
int vrtc_set_mmss(unsigned long nowtime)
} else {
printk(KERN_ERR
"%s: Invalid vRTC value: write of %lx to vRTC failed\n",
} else {
printk(KERN_ERR
"%s: Invalid vRTC value: write of %lx to vRTC failed\n",
- __FUNCTION__, now
time
);
+ __FUNCTION__, now
->tv_sec
);
retval = -EINVAL;
}
return retval;
retval = -EINVAL;
}
return retval;