Skip to content

Commit

Permalink
mfd: Implicitly register mc13xxx led subdevice
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Philippe Rétornaz authored and Samuel Ortiz committed Oct 24, 2011
1 parent 4a2a734 commit f20a5ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mfd/mc13xxx-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ static int mc13xxx_probe(struct spi_device *spi)
if (pdata->flags & MC13XXX_USE_TOUCHSCREEN)
mc13xxx_add_subdevice(mc13xxx, "%s-ts");

if (pdata->flags & MC13XXX_USE_LED)
if (pdata->leds)
mc13xxx_add_subdevice_pdata(mc13xxx, "%s-led",
pdata->leds, sizeof(*pdata->leds));

Expand Down

0 comments on commit f20a5ea

Please sign in to comment.