Commit 2978891a authored by Mario Limonciello's avatar Mario Limonciello Committed by Hans de Goede

platform/x86: amd-pmc: fix compilation without CONFIG_RTC_SYSTOHC_DEVICE

Just hardcode the RTC to "rtc0" which is the default for
CONFIG_RTC_SYSTOHC_DEVICE and used by all standard x86 distros.

Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Suggested-by: default avatarHans de Goede <hdegoede@redhat.com>
Fixes: 59348401 ("platform/x86: amd-pmc: Add special handling for timer based S0i3 wakeup")
Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20211026171443.289-1-mario.limonciello@amd.comReviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent fc3341b4
......@@ -425,7 +425,7 @@ static int amd_pmc_verify_czn_rtc(struct amd_pmc_dev *pdev, u32 *arg)
if (pdev->major < 64 || (pdev->major == 64 && pdev->minor < 53))
return 0;
rtc_device = rtc_class_open(CONFIG_RTC_SYSTOHC_DEVICE);
rtc_device = rtc_class_open("rtc0");
if (!rtc_device)
return 0;
rc = rtc_read_alarm(rtc_device, &alarm);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment