Skip to content

Commit fd7e2a2

Browse files
committed
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
2 parents 18937b0 + db4e955 commit fd7e2a2

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

drivers/rtc/rtc-cmos.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,6 +1233,9 @@ static u32 rtc_handler(void *context)
12331233

12341234
static inline void rtc_wake_setup(struct device *dev)
12351235
{
1236+
if (acpi_disabled)
1237+
return;
1238+
12361239
acpi_install_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler, dev);
12371240
/*
12381241
* After the RTC handler is installed, the Fixed_RTC event should
@@ -1286,7 +1289,6 @@ static void cmos_wake_setup(struct device *dev)
12861289

12871290
use_acpi_alarm_quirks();
12881291

1289-
rtc_wake_setup(dev);
12901292
acpi_rtc_info.wake_on = rtc_wake_on;
12911293
acpi_rtc_info.wake_off = rtc_wake_off;
12921294

@@ -1344,6 +1346,9 @@ static void cmos_check_acpi_rtc_status(struct device *dev,
13441346
{
13451347
}
13461348

1349+
static void rtc_wake_setup(struct device *dev)
1350+
{
1351+
}
13471352
#endif
13481353

13491354
#ifdef CONFIG_PNP
@@ -1354,6 +1359,8 @@ static int cmos_pnp_probe(struct pnp_dev *pnp, const struct pnp_device_id *id)
13541359
{
13551360
int irq, ret;
13561361

1362+
cmos_wake_setup(&pnp->dev);
1363+
13571364
if (pnp_port_start(pnp, 0) == 0x70 && !pnp_irq_valid(pnp, 0)) {
13581365
irq = 0;
13591366
#ifdef CONFIG_X86
@@ -1372,7 +1379,7 @@ static int cmos_pnp_probe(struct pnp_dev *pnp, const struct pnp_device_id *id)
13721379
if (ret)
13731380
return ret;
13741381

1375-
cmos_wake_setup(&pnp->dev);
1382+
rtc_wake_setup(&pnp->dev);
13761383

13771384
return 0;
13781385
}
@@ -1461,6 +1468,7 @@ static int __init cmos_platform_probe(struct platform_device *pdev)
14611468
int irq, ret;
14621469

14631470
cmos_of_init(pdev);
1471+
cmos_wake_setup(&pdev->dev);
14641472

14651473
if (RTC_IOMAPPED)
14661474
resource = platform_get_resource(pdev, IORESOURCE_IO, 0);
@@ -1474,7 +1482,7 @@ static int __init cmos_platform_probe(struct platform_device *pdev)
14741482
if (ret)
14751483
return ret;
14761484

1477-
cmos_wake_setup(&pdev->dev);
1485+
rtc_wake_setup(&pdev->dev);
14781486

14791487
return 0;
14801488
}

0 commit comments

Comments
 (0)