Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'platform-drivers-x86-v6.4-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform driver fix from Hans de Goede:
"One small fix for an AMD PMF driver issue which is causing issues for
users of just released AMD laptop models"

* tag 'platform-drivers-x86-v6.4-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
platform/x86/amd/pmf: Register notify handler only if SPS is enabled

+5 -5
+5 -5
drivers/platform/x86/amd/pmf/core.c
··· 297 297 /* Enable Static Slider */ 298 298 if (is_apmf_func_supported(dev, APMF_FUNC_STATIC_SLIDER_GRANULAR)) { 299 299 amd_pmf_init_sps(dev); 300 + dev->pwr_src_notifier.notifier_call = amd_pmf_pwr_src_notify_call; 301 + power_supply_reg_notifier(&dev->pwr_src_notifier); 300 302 dev_dbg(dev->dev, "SPS enabled and Platform Profiles registered\n"); 301 303 } 302 304 ··· 317 315 318 316 static void amd_pmf_deinit_features(struct amd_pmf_dev *dev) 319 317 { 320 - if (is_apmf_func_supported(dev, APMF_FUNC_STATIC_SLIDER_GRANULAR)) 318 + if (is_apmf_func_supported(dev, APMF_FUNC_STATIC_SLIDER_GRANULAR)) { 319 + power_supply_unreg_notifier(&dev->pwr_src_notifier); 321 320 amd_pmf_deinit_sps(dev); 321 + } 322 322 323 323 if (is_apmf_func_supported(dev, APMF_FUNC_AUTO_MODE)) { 324 324 amd_pmf_deinit_auto_mode(dev); ··· 403 399 apmf_install_handler(dev); 404 400 amd_pmf_dbgfs_register(dev); 405 401 406 - dev->pwr_src_notifier.notifier_call = amd_pmf_pwr_src_notify_call; 407 - power_supply_reg_notifier(&dev->pwr_src_notifier); 408 - 409 402 dev_info(dev->dev, "registered PMF device successfully\n"); 410 403 411 404 return 0; ··· 412 411 { 413 412 struct amd_pmf_dev *dev = platform_get_drvdata(pdev); 414 413 415 - power_supply_unreg_notifier(&dev->pwr_src_notifier); 416 414 amd_pmf_deinit_features(dev); 417 415 apmf_acpi_deinit(dev); 418 416 amd_pmf_dbgfs_unregister(dev);