]> err.no Git - linux-2.6/blobdiff - drivers/acpi/glue.c
Pull d-states into release branch
[linux-2.6] / drivers / acpi / glue.c
index 83768e9cf29651f6fb41beeb514706af76623fa2..4893e256e399bea43ee35a62a0c0fa16667d3bdf 100644 (file)
@@ -16,7 +16,7 @@
 #if ACPI_GLUE_DEBUG
 #define DBG(x...) printk(PREFIX x)
 #else
-#define DBG(x...)
+#define DBG(x...) do { } while(0)
 #endif
 static LIST_HEAD(bus_type_list);
 static DECLARE_RWSEM(bus_type_sem);
@@ -316,13 +316,20 @@ static int __init acpi_rtc_init(void)
                rtc_info.wake_on = rtc_wake_on;
                rtc_info.wake_off = rtc_wake_off;
 
+               /* workaround bug in some ACPI tables */
+               if (acpi_gbl_FADT.month_alarm && !acpi_gbl_FADT.day_alarm) {
+                       DBG("bogus FADT month_alarm\n");
+                       acpi_gbl_FADT.month_alarm = 0;
+               }
+
                rtc_info.rtc_day_alarm = acpi_gbl_FADT.day_alarm;
                rtc_info.rtc_mon_alarm = acpi_gbl_FADT.month_alarm;
                rtc_info.rtc_century = acpi_gbl_FADT.century;
 
                /* NOTE:  S4_RTC_WAKE is NOT currently useful to Linux */
                if (acpi_gbl_FADT.flags & ACPI_FADT_S4_RTC_WAKE)
-                       printk("ACPI: RTC can wake from S4\n");
+                       printk(PREFIX "RTC can wake from S4\n");
+
 
                dev->platform_data = &rtc_info;
 
@@ -331,7 +338,7 @@ static int __init acpi_rtc_init(void)
 
                put_device(dev);
        } else
-               pr_debug("ACPI: RTC unavailable?\n");
+               DBG("RTC unavailable?\n");
        return 0;
 }
 /* do this between RTC subsys_initcall() and rtc_cmos driver_initcall() */