Patch "platform/x86/amd/pmf: Fix a missing cleanup path" has been added to the 6.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

    platform/x86/amd/pmf: Fix a missing cleanup path

to the 6.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:
     platform-x86-amd-pmf-fix-a-missing-cleanup-path.patch
and it can be found in the queue-6.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 2e8973a32528b5fee28fe557e4f9685171c20671
Author: Mario Limonciello <mario.limonciello@xxxxxxx>
Date:   Wed Aug 23 13:54:21 2023 -0500

    platform/x86/amd/pmf: Fix a missing cleanup path
    
    [ Upstream commit 4dbd6e61adc7e52dd1c9165f0ccaa90806611e40 ]
    
    On systems that support slider notifications but don't otherwise support
    granular slider the SPS cleanup path doesn't run.
    
    This means that loading/unloading/loading leads to failures because
    the sysfs files don't get setup properly when reloaded.
    
    Add the missing cleanup path.
    
    Fixes: 33c9ab5b493a ("platform/x86/amd/pmf: Notify OS power slider update")
    Signed-off-by: Mario Limonciello <mario.limonciello@xxxxxxx>
    Link: https://lore.kernel.org/r/20230823185421.23959-1-mario.limonciello@xxxxxxx
    Reviewed-by: Hans de Goede <hdegoede@xxxxxxxxxx>
    Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/platform/x86/amd/pmf/core.c b/drivers/platform/x86/amd/pmf/core.c
index a022325161273..6fa33a05c5a75 100644
--- a/drivers/platform/x86/amd/pmf/core.c
+++ b/drivers/platform/x86/amd/pmf/core.c
@@ -322,7 +322,8 @@ static void amd_pmf_init_features(struct amd_pmf_dev *dev)
 
 static void amd_pmf_deinit_features(struct amd_pmf_dev *dev)
 {
-	if (is_apmf_func_supported(dev, APMF_FUNC_STATIC_SLIDER_GRANULAR)) {
+	if (is_apmf_func_supported(dev, APMF_FUNC_STATIC_SLIDER_GRANULAR) ||
+	    is_apmf_func_supported(dev, APMF_FUNC_OS_POWER_SLIDER_UPDATE)) {
 		power_supply_unreg_notifier(&dev->pwr_src_notifier);
 		amd_pmf_deinit_sps(dev);
 	}



[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