From: Philippe Rétornaz Date: Fri, 22 Jul 2011 14:17:08 +0000 (+0200) Subject: mfd: Implicitly register mc13xxx led subdevice X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f20a5ea8e3aa8cb5cfe74bd8705dbb609a24783c;p=mv-sheeva.git 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 Signed-off-by: Uwe Kleine-König Signed-off-by: Samuel Ortiz --- diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c index dd232ea7375..e55b2213623 100644 --- a/drivers/mfd/mc13xxx-core.c +++ b/drivers/mfd/mc13xxx-core.c @@ -759,7 +759,7 @@ err_revision: 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));