]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
leds: just ignore invalid GPIOs in leds-gpio
authorDavid Brownell <dbrownell@users.sourceforge.net>
Fri, 6 Mar 2009 00:46:44 +0000 (16:46 -0800)
committerRichard Purdie <rpurdie@linux.intel.com>
Mon, 6 Apr 2009 15:06:27 +0000 (16:06 +0100)
commitd379ee8acd0719736ee7f1d1ccc3b5765880eaf8
treef998ab138b72c5bd597b45ea28c04a3f92586f28
parent7fbc3a9b132e93b2ba1fd889c1ad8a4135731cc3
leds: just ignore invalid GPIOs in leds-gpio

Sometimes it's awkward to make sure that the array in the
platform_data handed to the leds-gpio driver has only valid
data ... some leds may not be always available, and coping
with that currently requires patching or rebuilding the array.

This patch fixes that by making it be OK to pass an invalid
GPIO (such as "-EINVAL") ... such table entries are skipped.

[rpurdie@linux.intel.com: adjusted to apply against other led tree changes]
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Tested-by: Diego Dompe <diego.dompe@ridgerun.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
drivers/leds/leds-gpio.c