aboutsummaryrefslogtreecommitdiff
path: root/include/asm-powerpc/rtc.h
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-10-22 15:57:55 +1000
committerPaul Mackerras <paulus@samba.org>2005-10-22 15:57:55 +1000
commitb6ba92819dc1304a4e5a0bf06b297c657b58168a (patch)
tree3ae9182dc1c0fe58dc43f8ae196cf5ac484482c6 /include/asm-powerpc/rtc.h
parentef1a12817aebc313049d226f96eee86e4bcc94a3 (diff)
powerpc: Make set_rtc_time() return error code from lower-level function
Previously it ignored the return value from ppc_md.set_rtc_time, but in fact the functions that that can point to do return a useful error code, so return it from set_rtc_time(). Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/rtc.h')
-rw-r--r--include/asm-powerpc/rtc.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/asm-powerpc/rtc.h b/include/asm-powerpc/rtc.h
index d38f2a077db..f5802926b6c 100644
--- a/include/asm-powerpc/rtc.h
+++ b/include/asm-powerpc/rtc.h
@@ -52,10 +52,8 @@ static inline unsigned int get_rtc_time(struct rtc_time *time)
/* Set the current date and time in the real time clock. */
static inline int set_rtc_time(struct rtc_time *time)
{
- if (ppc_md.get_rtc_time) {
- ppc_md.set_rtc_time(time);
- return 0;
- }
+ if (ppc_md.set_rtc_time)
+ return ppc_md.set_rtc_time(time);
return -EINVAL;
}