]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mfd: Implicitly register mc13xxx led subdevice
authorPhilippe Rétornaz <philippe.retornaz@epfl.ch>
Fri, 22 Jul 2011 14:17:08 +0000 (16:17 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 24 Oct 2011 12:09:14 +0000 (14:09 +0200)
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>
drivers/mfd/mc13xxx-core.c

index dd232ea73757829d6f5293da91caf15f084df688..e55b22136234d849109e588efd16c9f67e407b9c 100644 (file)
@@ -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));