platform/x86: alienware-wmi: Improve rgb-zones group creation
authorKurt Borja <kuurtb@gmail.com>
Sun, 5 Jan 2025 15:30:05 +0000 (10:30 -0500)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Wed, 15 Jan 2025 14:25:31 +0000 (16:25 +0200)
commit61493f947220e36df6468d61f94501152ed2477c
treee7146716d9bdf916af539932985200cd7dfdee73
parent1d334211aa60560cdc3995b183e601c44cf722b5
platform/x86: alienware-wmi: Improve rgb-zones group creation

Define zone_attrs statically and initialize zone_attribute_group with
platform driver's .dev_groups.

Drop match_zone() and instead pass a `location` argument to previous
show/store methods to access the correct `zone` LED state. On top of
that rename zone_set() -> zone_store() to be more consistent with sysfs
conventions.

Reviewed-by: Armin Wolf <W_Armin@gmx.de>
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20250105153019.19206-7-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