mfd: Implicitly register mc13xxx led subdevice
A led subdevice is registered now iff the corresponding platform data is available. Without platform data the device isn't usable so this is a sound check. Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
4a2a734306
commit
f20a5ea8e3
|
@ -759,7 +759,7 @@ err_revision:
|
||||||
if (pdata->flags & MC13XXX_USE_TOUCHSCREEN)
|
if (pdata->flags & MC13XXX_USE_TOUCHSCREEN)
|
||||||
mc13xxx_add_subdevice(mc13xxx, "%s-ts");
|
mc13xxx_add_subdevice(mc13xxx, "%s-ts");
|
||||||
|
|
||||||
if (pdata->flags & MC13XXX_USE_LED)
|
if (pdata->leds)
|
||||||
mc13xxx_add_subdevice_pdata(mc13xxx, "%s-led",
|
mc13xxx_add_subdevice_pdata(mc13xxx, "%s-led",
|
||||||
pdata->leds, sizeof(*pdata->leds));
|
pdata->leds, sizeof(*pdata->leds));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue