lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250518-hid_lenovo_acpi_dependency-v1-1-afdb93b5d1a6@jannau.net>
Date: Sun, 18 May 2025 12:18:37 +0200
From: Janne Grunau via B4 Relay <devnull+j.jannau.net@...nel.org>
To: Arnd Bergmann <arnd@...db.de>, Jiri Kosina <jikos@...nel.org>, 
 Benjamin Tissoires <bentiss@...nel.org>, 
 "Rafael J. Wysocki" <rafael@...nel.org>, Len Brown <lenb@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-input@...r.kernel.org, 
 linux-acpi@...r.kernel.org, Janne Grunau <j@...nau.net>
Subject: [PATCH 1/2] ACPI: platform_profile: Stub platform_profile_cycle

From: Janne Grunau <j@...nau.net>

This is required to allow USB/Bluetooth HID devices to cycle through
platform profiles without depending on ACPI. Commit 52572cde8b4a4
("HID: lenovo: select CONFIG_ACPI_PLATFORM_PROFILE") added this
dependency for hid-lenovo which is used for external USB and Bluetooth
devices.

Fixes: 52572cde8b4a4 ("HID: lenovo: select CONFIG_ACPI_PLATFORM_PROFILE")
Signed-off-by: Janne Grunau <j@...nau.net>
---
 include/linux/platform_profile.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/include/linux/platform_profile.h b/include/linux/platform_profile.h
index a299225ab92e78ce2e978b1774cdfc95cc688e8f..05a6749991601fd373683c3d498c6e9cc4f97882 100644
--- a/include/linux/platform_profile.h
+++ b/include/linux/platform_profile.h
@@ -54,7 +54,18 @@ void platform_profile_remove(struct device *dev);
 struct device *devm_platform_profile_register(struct device *dev, const char *name,
 					      void *drvdata,
 					      const struct platform_profile_ops *ops);
+#ifdef CONFIG_ACPI_PLATFORM_PROFILE
 int platform_profile_cycle(void);
+#else
+/*
+ * This stub is needed to allow USB/Bluetooth HID drivers to cycle through
+ * platform profiles.
+ */
+static inline int platform_profile_cycle(void)
+{
+	return 0;
+}
+#endif /* CONFIG_ACPI_PLATFORM_PROFILE */
 void platform_profile_notify(struct device *dev);
 
 #endif  /*_PLATFORM_PROFILE_H_*/

-- 
2.49.0



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ