]> www.infradead.org Git - users/jedix/linux-maple.git/commit
leds: leds-lp55xx: Generalize probe/remove functions
authorChristian Marangi <ansuelsmth@gmail.com>
Wed, 26 Jun 2024 16:00:09 +0000 (18:00 +0200)
committerLee Jones <lee@kernel.org>
Wed, 26 Jun 2024 16:08:30 +0000 (17:08 +0100)
commitdb30c2891bfc74acb8823edee5f39cbc36bd9a4d
treedc5c978901b4d70f55f2703ca574ba4ea159dc06
parenta9b202b9cf0e817be756a720920ad4b522e6f6aa
leds: leds-lp55xx: Generalize probe/remove functions

Now that stop_all_engine is generalized, probe and remove function are
the same across every lp55xx based LED driver and can be generalized.

To permit to use a common probe, make use of the OF match_data and i2c
driver_data value to store the device_config struct specific for the
LED.

Also drop the now unused exported symbol in lp55xx-common and make them
static.

Update any lp55xx based LED driver to use the new generic probe/remove.

Suggested-by: Lee Jones <lee@kernel.org>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Link: https://lore.kernel.org/r/20240626160027.19703-5-ansuelsmth@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/leds/leds-lp5521.c
drivers/leds/leds-lp5523.c
drivers/leds/leds-lp5562.c
drivers/leds/leds-lp55xx-common.c
drivers/leds/leds-lp55xx-common.h
drivers/leds/leds-lp8501.c