battclock.resource: Oops - forgot to remove an implicit ACPICABase
[AROS.git] / arch / all-pc / battclock / battclock_init.c
blob37f07ca9c3529721356bdf78e0e912d5128f1cd3
1 #include <aros/debug.h>
2 #include <aros/symbolsets.h>
3 #include <proto/acpica.h>
4 #include <proto/exec.h>
6 #include "battclock_intern.h"
7 #include "cmos.h"
9 /* auto init */
10 static int BattClock_Init(struct BattClockBase *BattClockBase)
12 struct Library *ACPICABase;
13 InitSemaphore(&BattClockBase->sem);
14 BattClockBase->century = CENTURY; /* Default offset */
16 if ((ACPICABase = OpenLibrary("acpica.library",0)))
18 ACPI_TABLE_FADT *fadt;
19 ACPI_STATUS err;
21 err = AcpiGetTable("FACP", 1, (ACPI_TABLE_HEADER **)&fadt);
22 if (err == AE_OK) {
23 if ((fadt->Header.Length >= offsetof(ACPI_TABLE_FADT, Century)) &&
24 fadt->Century)
26 D(bug("[BattClock] Got RTC century offset 0x%02X from ACPI\n", fadt->Century));
27 BattClockBase->century = fadt->Century;
32 return 1;
35 ADD2INITLIB(BattClock_Init, 0)