mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-29 01:09:33 -04:00
Merge tag 'rtc-6.1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
Pull RTC fixes from Alexandre Belloni: "Fix wakeup support that broke on multiple platforms" * tag 'rtc-6.1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: rtc: cmos: fix build on non-ACPI platforms rtc: cmos: Fix wake alarm breakage
This commit is contained in:
@@ -1233,6 +1233,9 @@ static u32 rtc_handler(void *context)
|
||||
|
||||
static inline void rtc_wake_setup(struct device *dev)
|
||||
{
|
||||
if (acpi_disabled)
|
||||
return;
|
||||
|
||||
acpi_install_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler, dev);
|
||||
/*
|
||||
* After the RTC handler is installed, the Fixed_RTC event should
|
||||
@@ -1286,7 +1289,6 @@ static void cmos_wake_setup(struct device *dev)
|
||||
|
||||
use_acpi_alarm_quirks();
|
||||
|
||||
rtc_wake_setup(dev);
|
||||
acpi_rtc_info.wake_on = rtc_wake_on;
|
||||
acpi_rtc_info.wake_off = rtc_wake_off;
|
||||
|
||||
@@ -1344,6 +1346,9 @@ static void cmos_check_acpi_rtc_status(struct device *dev,
|
||||
{
|
||||
}
|
||||
|
||||
static void rtc_wake_setup(struct device *dev)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PNP
|
||||
@@ -1354,6 +1359,8 @@ static int cmos_pnp_probe(struct pnp_dev *pnp, const struct pnp_device_id *id)
|
||||
{
|
||||
int irq, ret;
|
||||
|
||||
cmos_wake_setup(&pnp->dev);
|
||||
|
||||
if (pnp_port_start(pnp, 0) == 0x70 && !pnp_irq_valid(pnp, 0)) {
|
||||
irq = 0;
|
||||
#ifdef CONFIG_X86
|
||||
@@ -1372,7 +1379,7 @@ static int cmos_pnp_probe(struct pnp_dev *pnp, const struct pnp_device_id *id)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
cmos_wake_setup(&pnp->dev);
|
||||
rtc_wake_setup(&pnp->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1461,6 +1468,7 @@ static int __init cmos_platform_probe(struct platform_device *pdev)
|
||||
int irq, ret;
|
||||
|
||||
cmos_of_init(pdev);
|
||||
cmos_wake_setup(&pdev->dev);
|
||||
|
||||
if (RTC_IOMAPPED)
|
||||
resource = platform_get_resource(pdev, IORESOURCE_IO, 0);
|
||||
@@ -1474,7 +1482,7 @@ static int __init cmos_platform_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
cmos_wake_setup(&pdev->dev);
|
||||
rtc_wake_setup(&pdev->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user