HID: asus: Check CONFIG_PLATFORM_PROFILE for the profile key
PATCH 1/1 HID: asus: Check CONFIG_PLATFORM_PROFILE for the profile key
Commit 699041135f75 ("platform profile: Extract the core from ACPI") renamed ACPI_PLATFORM_PROFILE to PLATFORM_PROFILE. hid-asus.c still checks IS_REACHABLE(CONFIG_ACPI_PLATFORM_PROFILE), which is now always false, so the Zenbook Duo profile key no longer cycles the platform profile.
Check the new symbol.
Signed-off-by Sasha Levin <[email protected]>
---
This needs Rafael's immutable acpi-platform-profile branch in the hid tree first:
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git acpi-platform-profile
With the hid and pm trees both merged, hid-asus.o calls platform_profile_cycle() again with this patch; without it the call is compiled out.
drivers/hid/hid-asus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/hid/hid-asus.c +2 -2
@@ -438,7 +438,7 @@ static int asus_platform_profile_cycle(struct asus_drvdata *drvdata)struct asus_worker *worker = drvdata->worker;struct asus_work_action *action, *pending; -if (!IS_REACHABLE (CONFIG_ACPI_PLATFORM_PROFILE )) +if (!IS_REACHABLE (CONFIG_PLATFORM_PROFILE ))return 0 ;guard (spinlock_irqsave)(&worker->lock);
@@ -870,7 +870,7 @@ static void asus_work(struct work_struct *work)asus_kbd_wmi_fan (worker->hdev, &action->data.fan_hid_data);break ;case PLATFORM_PROFILE_CYCLE : -if (!IS_REACHABLE (CONFIG_ACPI_PLATFORM_PROFILE )) +if (!IS_REACHABLE (CONFIG_PLATFORM_PROFILE ))break ; ret =platform_profile_cycle ();if (ret)
Signature · 1 line
2.53.0