time.c (c6380ecd8e9bee7aba3d9a5a94b58168244c4a61) time.c (890ae7979758568734881ad0f382c4064e2386c3)
1/*
2 * Common time routines among all ppc machines.
3 *
4 * Written by Cort Dougan (cort@cs.nmt.edu) to merge
5 * Paul Mackerras' version and mine for PReP and Pmac.
6 * MPC8xx/MBX changes by Dan Malek (dmalek@jlc.net).
7 * Converted for 64-bit by Mike Corrigan (mikejc@us.ibm.com)
8 *

--- 1220 unchanged lines hidden (view full) ---

1229 */
1230 loops_per_jiffy = tb_ticks_per_jiffy;
1231}
1232
1233#if IS_ENABLED(CONFIG_RTC_DRV_GENERIC)
1234static int rtc_generic_get_time(struct device *dev, struct rtc_time *tm)
1235{
1236 ppc_md.get_rtc_time(tm);
1/*
2 * Common time routines among all ppc machines.
3 *
4 * Written by Cort Dougan (cort@cs.nmt.edu) to merge
5 * Paul Mackerras' version and mine for PReP and Pmac.
6 * MPC8xx/MBX changes by Dan Malek (dmalek@jlc.net).
7 * Converted for 64-bit by Mike Corrigan (mikejc@us.ibm.com)
8 *

--- 1220 unchanged lines hidden (view full) ---

1229 */
1230 loops_per_jiffy = tb_ticks_per_jiffy;
1231}
1232
1233#if IS_ENABLED(CONFIG_RTC_DRV_GENERIC)
1234static int rtc_generic_get_time(struct device *dev, struct rtc_time *tm)
1235{
1236 ppc_md.get_rtc_time(tm);
1237 return rtc_valid_tm(tm);
1237 return 0;
1238}
1239
1240static int rtc_generic_set_time(struct device *dev, struct rtc_time *tm)
1241{
1242 if (!ppc_md.set_rtc_time)
1243 return -EOPNOTSUPP;
1244
1245 if (ppc_md.set_rtc_time(tm) < 0)

--- 26 unchanged lines hidden ---
1238}
1239
1240static int rtc_generic_set_time(struct device *dev, struct rtc_time *tm)
1241{
1242 if (!ppc_md.set_rtc_time)
1243 return -EOPNOTSUPP;
1244
1245 if (ppc_md.set_rtc_time(tm) < 0)

--- 26 unchanged lines hidden ---