aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/mc13xxx-core.c
diff options
context:
space:
mode:
authorPhilippe Rétornaz <philippe.retornaz@epfl.ch>2011-07-22 16:17:08 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2011-10-24 14:09:14 +0200
commitf20a5ea8e3aa8cb5cfe74bd8705dbb609a24783c (patch)
tree8c3e3a030f5ae4c2d273f6aacc6a5e00e956b996 /drivers/mfd/mc13xxx-core.c
parentmfd: Unconditionally register mc13xxx regulator subdevice (diff)
downloadlinux-dev-f20a5ea8e3aa8cb5cfe74bd8705dbb609a24783c.tar.xz
linux-dev-f20a5ea8e3aa8cb5cfe74bd8705dbb609a24783c.zip
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>
Diffstat (limited to 'drivers/mfd/mc13xxx-core.c')
-rw-r--r--drivers/mfd/mc13xxx-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c
index dd232ea73757..e55b22136234 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));