]> www.infradead.org Git - users/jedix/linux-maple.git/commit
platform/x86: alienware-wmi: Improve hdmi_mux, amplifier and deepslp group creation
authorKurt Borja <kuurtb@gmail.com>
Sun, 5 Jan 2025 15:30:04 +0000 (10:30 -0500)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Thu, 9 Jan 2025 11:40:35 +0000 (13:40 +0200)
commit1d334211aa60560cdc3995b183e601c44cf722b5
tree3ce60e0183f99c8c6ab07982fde7dbfd63a98938
parentf3f6728766c3f3695dea5d63ec60bdd516c2ace8
platform/x86: alienware-wmi: Improve hdmi_mux, amplifier and deepslp group creation

Devices with hdmi_mux, amplifier or deepslp quirks create a sysfs group
for each available feature. To accomplish this, helper create/remove
functions were called on module init, but they had the following
problems:

 - Create helpers called remove helpers on failure, which in turn tried
   to remove the sysfs group that failed to be created
 - If group creation failed mid way, previous successfully created groups
   were not cleaned up
 - Module exit only removed hdmi_mux group

To improve this, drop all helpers and let the platform driver manage these
sysfs groups, while controlling visibility with their respective quirks.

Reviewed-by: Armin Wolf <W_Armin@gmx.de>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
Link: https://lore.kernel.org/r/20250105153019.19206-6-kuurtb@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/dell/alienware-wmi.c