rtc: cmos: Remove the `use_acpi_alarm' module parameter for !ACPI
authorMaciej W. Rozycki <macro@linux-mips.org>
Tue, 2 Oct 2018 01:09:05 +0000 (02:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2018 19:08:51 +0000 (11:08 -0800)
commit65635b7d4dd7c0f74c3f476b4972c1202e6e9c4f
tree7c055679064f2d20548fa76a245ae25d0fe99a80
parent65a060ca4bfc129bcdc1bdfbafda1396e2ce77ad
rtc: cmos: Remove the `use_acpi_alarm' module parameter for !ACPI

commit bc51098cdd9573bfdecfd02fc8ed474419d73ea0 upstream.

Fix a problem with commit 311ee9c151ad ("rtc: cmos: allow using ACPI for
RTC alarm instead of HPET") defining `use_acpi_alarm' module parameter
even for non-ACPI platforms, which ignore it.  Wrap the definition into
#ifdef CONFIG_ACPI and use a static inline wrapper function, hardcoded
to return 0 and consequently optimized away for !ACPI, following the
existing pattern with HPET handling functions.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Fixes: 311ee9c151ad ("rtc: cmos: allow using ACPI for RTC alarm instead of HPET")
Cc: stable@vger.kernel.org # 4.18+
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/rtc/rtc-cmos.c