char/genrtc: x86: remove remnants of asm/rtc.h

Commit 3195ef59cb ("x86: Do full rtc synchronization with ntp") had
the side-effect of unconditionally enabling the RTC_LIB symbol on x86,
which in turn disables the selection of the CONFIG_RTC and
CONFIG_GEN_RTC drivers that contain a two older implementations of
the CONFIG_RTC_DRV_CMOS driver.

This removes x86 from the list for genrtc, and changes all references
to the asm/rtc.h header to instead point to the interfaces
from linux/mc146818rtc.h.

Signed-off-by: Arnd Bergmann <[email protected]>
Acked-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
This commit is contained in:
Arnd Bergmann 2016-05-30 20:57:51 +02:00 • committed by Alexandre Belloni
commit 463a86304c
8 changed files with 8 additions and 12 deletions

View file

@ -11,7 +11,7 @@
#include <linux/export.h>
#include <linux/rtc.h>
#include <asm/rtc.h>
#include <linux/mc146818rtc.h>
#include "power.h"
@ -103,7 +103,7 @@ static int set_magic_time(unsigned int user, unsigned int file, unsigned int dev
n /= 24;
time.tm_min = (n % 20) * 3;
n /= 20;
set_rtc_time(&time);
mc146818_set_time(&time);
return n ? -1 : 0;
}
@ -112,7 +112,7 @@ static unsigned int read_magic_time(void)
struct rtc_time time;
unsigned int val;
get_rtc_time(&time);
mc146818_get_time(&time);
pr_info("RTC time: %2d:%02d:%02d, date: %02d/%02d/%02d\n",
time.tm_hour, time.tm_min, time.tm_sec,
time.tm_mon + 1, time.tm_mday, time.tm_year % 100);