Patch "rtc: cmos: Refactor code by using the new dmi_get_bios_year() helper" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    rtc: cmos: Refactor code by using the new dmi_get_bios_year() helper

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     rtc-cmos-refactor-code-by-using-the-new-dmi_get_bios.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 580ea6ef977ad83e0e2e37db9dc68b9ed4d6f534
Author: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Date:   Thu Jan 23 15:14:37 2020 +0200

    rtc: cmos: Refactor code by using the new dmi_get_bios_year() helper
    
    [ Upstream commit 604c521259c8051b7607c000eda7938f7a705d92 ]
    
    Refactor code by using the new dmi_get_bios_year() helper instead of
    open coding its functionality. This also makes logic slightly clearer.
    
    No changes intended.
    
    Cc: Hans de Goede <hdegoede@xxxxxxxxxx>
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
    Tested-by: Guilherme G. Piccoli <gpiccoli@xxxxxxxxxxxxx>
    Reviewed-by: Hans de Goede <hdegoede@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20200123131437.28157-3-andriy.shevchenko@xxxxxxxxxxxxxxx
    Signed-off-by: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>
    Stable-dep-of: 83ebb7b3036d ("rtc: cmos: Disable ACPI RTC event on removal")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index c0dc03ffa817..60271ea2a28d 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -1200,8 +1200,6 @@ static void rtc_wake_off(struct device *dev)
 /* Enable use_acpi_alarm mode for Intel platforms no earlier than 2015 */
 static void use_acpi_alarm_quirks(void)
 {
-	int year;
-
 	if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL)
 		return;
 
@@ -1211,8 +1209,10 @@ static void use_acpi_alarm_quirks(void)
 	if (!is_hpet_enabled())
 		return;
 
-	if (dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL) && year >= 2015)
-		use_acpi_alarm = true;
+	if (dmi_get_bios_year() < 2015)
+		return;
+
+	use_acpi_alarm = true;
 }
 #else
 static inline void use_acpi_alarm_quirks(void) { }



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux