]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
platform/x86: int3472: Use local variable for LED struct access
authorMarco Nenciarini <mnencia@kcore.it>
Wed, 1 Apr 2026 20:36:35 +0000 (22:36 +0200)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Fri, 10 Apr 2026 14:11:12 +0000 (17:11 +0300)
commitd6116d86e58a04a9522e349c4a27145521c01ad7
treeec9f0f5eea54be2644bc250bee624e280fb11bd0
parenta29b5cd42f5bc6ba1be6422f61f3f05bab707ce8
platform/x86: int3472: Use local variable for LED struct access

Introduce a local struct int3472_pled pointer in the LED registration,
unregistration, and brightness callback functions to avoid repeatedly
dereferencing int3472->pled. In the brightness callback, use
container_of() to get the int3472_pled struct directly instead of
going through int3472_discrete_device.

No functional change.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Signed-off-by: Marco Nenciarini <mnencia@kcore.it>
Link: https://patch.msgid.link/20260401203638.1601661-2-mnencia@kcore.it
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/intel/int3472/led.c