mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-06 06:37:59 +00:00
rtc: cmos: Revert "rtc-cmos: Add an alarm disable quirk"
Commit d5a1c7e3fc
("rtc-cmos: Add an alarm disable quirk") that
added a special quirk is not needed because [PATCH 1/2] of this
patchset makes the kernel more robust:
rtc-cmos: Cancel alarm timer if alarm time is equal to now+1 seconds
Signed-off-by: Adrian Huang <ahuang12@lenovo.com>
Tested-by: Egbert Eich <eich@suse.de>
Tested-by: Diego Ercolani <diego.ercolani@gmail.com>
Cc: Borislav Petkov <bp@suse.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
This commit is contained in:
parent
88b8d33b1c
commit
8109d44f76
1 changed files with 0 additions and 50 deletions
|
@ -41,7 +41,6 @@
|
||||||
#include <linux/pm.h>
|
#include <linux/pm.h>
|
||||||
#include <linux/of.h>
|
#include <linux/of.h>
|
||||||
#include <linux/of_platform.h>
|
#include <linux/of_platform.h>
|
||||||
#include <linux/dmi.h>
|
|
||||||
|
|
||||||
/* this is for "generic access to PC-style RTC" using CMOS_READ/CMOS_WRITE */
|
/* this is for "generic access to PC-style RTC" using CMOS_READ/CMOS_WRITE */
|
||||||
#include <asm-generic/rtc.h>
|
#include <asm-generic/rtc.h>
|
||||||
|
@ -383,50 +382,6 @@ static int cmos_set_alarm(struct device *dev, struct rtc_wkalrm *t)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Do not disable RTC alarm on shutdown - workaround for b0rked BIOSes.
|
|
||||||
*/
|
|
||||||
static bool alarm_disable_quirk;
|
|
||||||
|
|
||||||
static int __init set_alarm_disable_quirk(const struct dmi_system_id *id)
|
|
||||||
{
|
|
||||||
alarm_disable_quirk = true;
|
|
||||||
pr_info("BIOS has alarm-disable quirk - RTC alarms disabled\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static const struct dmi_system_id rtc_quirks[] __initconst = {
|
|
||||||
/* https://bugzilla.novell.com/show_bug.cgi?id=805740 */
|
|
||||||
{
|
|
||||||
.callback = set_alarm_disable_quirk,
|
|
||||||
.ident = "IBM Truman",
|
|
||||||
.matches = {
|
|
||||||
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
|
|
||||||
DMI_MATCH(DMI_PRODUCT_NAME, "4852570"),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
/* https://bugzilla.novell.com/show_bug.cgi?id=812592 */
|
|
||||||
{
|
|
||||||
.callback = set_alarm_disable_quirk,
|
|
||||||
.ident = "Gigabyte GA-990XA-UD3",
|
|
||||||
.matches = {
|
|
||||||
DMI_MATCH(DMI_SYS_VENDOR,
|
|
||||||
"Gigabyte Technology Co., Ltd."),
|
|
||||||
DMI_MATCH(DMI_PRODUCT_NAME, "GA-990XA-UD3"),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
/* http://permalink.gmane.org/gmane.linux.kernel/1604474 */
|
|
||||||
{
|
|
||||||
.callback = set_alarm_disable_quirk,
|
|
||||||
.ident = "Toshiba Satellite L300",
|
|
||||||
.matches = {
|
|
||||||
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
|
|
||||||
DMI_MATCH(DMI_PRODUCT_NAME, "Satellite L300"),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{}
|
|
||||||
};
|
|
||||||
|
|
||||||
static int cmos_alarm_irq_enable(struct device *dev, unsigned int enabled)
|
static int cmos_alarm_irq_enable(struct device *dev, unsigned int enabled)
|
||||||
{
|
{
|
||||||
struct cmos_rtc *cmos = dev_get_drvdata(dev);
|
struct cmos_rtc *cmos = dev_get_drvdata(dev);
|
||||||
|
@ -435,9 +390,6 @@ static int cmos_alarm_irq_enable(struct device *dev, unsigned int enabled)
|
||||||
if (!is_valid_irq(cmos->irq))
|
if (!is_valid_irq(cmos->irq))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (alarm_disable_quirk)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
spin_lock_irqsave(&rtc_lock, flags);
|
spin_lock_irqsave(&rtc_lock, flags);
|
||||||
|
|
||||||
if (enabled)
|
if (enabled)
|
||||||
|
@ -1299,8 +1251,6 @@ static int __init cmos_init(void)
|
||||||
platform_driver_registered = true;
|
platform_driver_registered = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
dmi_check_system(rtc_quirks);
|
|
||||||
|
|
||||||
if (retval == 0)
|
if (retval == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue