mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 02:50:54 +07:00
acpi: use bcd2bin/bin2bcd
Change ACPI to use the new bcd2bin/bin2bcd functions instead of the obsolete BCD_TO_BIN/BIN_TO_BCD macros. Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: Andi Kleen <andi@firstfloor.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
fdd2e5f88a
commit
ab527d7578
@ -120,13 +120,13 @@ static int acpi_system_alarm_seq_show(struct seq_file *seq, void *offset)
|
|||||||
spin_unlock_irqrestore(&rtc_lock, flags);
|
spin_unlock_irqrestore(&rtc_lock, flags);
|
||||||
|
|
||||||
if (!(rtc_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
|
if (!(rtc_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
|
||||||
BCD_TO_BIN(sec);
|
sec = bcd2bin(sec);
|
||||||
BCD_TO_BIN(min);
|
min = bcd2bin(min);
|
||||||
BCD_TO_BIN(hr);
|
hr = bcd2bin(hr);
|
||||||
BCD_TO_BIN(day);
|
day = bcd2bin(day);
|
||||||
BCD_TO_BIN(mo);
|
mo = bcd2bin(mo);
|
||||||
BCD_TO_BIN(yr);
|
yr = bcd2bin(yr);
|
||||||
BCD_TO_BIN(cent);
|
cent = bcd2bin(cent);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we're trusting the FADT (see above) */
|
/* we're trusting the FADT (see above) */
|
||||||
@ -204,7 +204,7 @@ static u32 cmos_bcd_read(int offset, int rtc_control)
|
|||||||
{
|
{
|
||||||
u32 val = CMOS_READ(offset);
|
u32 val = CMOS_READ(offset);
|
||||||
if (!(rtc_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD)
|
if (!(rtc_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD)
|
||||||
BCD_TO_BIN(val);
|
val = bcd2bin(val);
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -212,7 +212,7 @@ static u32 cmos_bcd_read(int offset, int rtc_control)
|
|||||||
static void cmos_bcd_write(u32 val, int offset, int rtc_control)
|
static void cmos_bcd_write(u32 val, int offset, int rtc_control)
|
||||||
{
|
{
|
||||||
if (!(rtc_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD)
|
if (!(rtc_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD)
|
||||||
BIN_TO_BCD(val);
|
val = bin2bcd(val);
|
||||||
CMOS_WRITE(val, offset);
|
CMOS_WRITE(val, offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user