[PATCH 2/3] Add coniditional check for callback function of lp5521 platform_data
Matt Hsu
matt_hsu at openmoko.org
Sat Jan 10 18:25:23 CET 2009
Avoid to break the support of N80, it's needed to have this check.
Signed-off-by: Matt Hsu <matt_hsu at openmoko.org>
---
drivers/leds/leds-lp5521.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c
index 8b0e5f6..62d68fd 100644
--- a/drivers/leds/leds-lp5521.c
+++ b/drivers/leds/leds-lp5521.c
@@ -544,7 +544,8 @@ static int lp5521_probe(struct i2c_client *client, const struct i2c_device_id *i
mutex_init(&chip->lock);
/* enter start-up mode */
- (pdata->ext_enable)(1);
+ if (pdata->ext_enable)
+ (pdata->ext_enable)(1);
ret = lp5521_configure(client);
if (ret < 0) {
--
1.5.6.5
More information about the openmoko-kernel
mailing list