aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authormerge <null@invalid>2009-01-10 17:38:04 +0000
committerAndy Green <agreen@pads.home.warmcat.com>2009-01-10 17:38:04 +0000
commit477ca2f89a5ec6ffd286b760ab254ac053814537 (patch)
treeb25b8643a674478366589a4bba8f3cdda98c035b /drivers
parent458301db547e53750141e33668dc6d55789aec32 (diff)
MERGE-via-pending-tracking-hist-MERGE-via-stable-tracking-add-coniditional-check-for-cal-1231608959
pending-tracking-hist top was MERGE-via-stable-tracking-add-coniditional-check-for-cal-1231608959 / cae5d78813ff79a460474e528049e39b0320bd94 ... parent commitmessage: From: merge <null@invalid> MERGE-via-stable-tracking-hist-add-coniditional-check-for-cal stable-tracking-hist top was add-coniditional-check-for-cal / 418cf8217d80f14f3ef56b9d1163bbc05bdbd3b4 ... parent commitmessage: From: Matt Hsu <matt_hsu@openmoko.org> Add coniditional check for callback function of lp5521 platform_data Avoid to break the support of N80, it's needed to have this check. Signed-off-by: Matt Hsu <matt_hsu@openmoko.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/i2c/chips/Kconfig6
-rw-r--r--drivers/i2c/chips/Makefile1
-rw-r--r--drivers/leds/Kconfig7
-rw-r--r--drivers/leds/Makefile1
-rw-r--r--drivers/leds/leds-lp5521.c (renamed from drivers/i2c/chips/lp5521.c)5
5 files changed, 11 insertions, 9 deletions
diff --git a/drivers/i2c/chips/Kconfig b/drivers/i2c/chips/Kconfig
index afb38f5431a..422ee3f8ee9 100644
--- a/drivers/i2c/chips/Kconfig
+++ b/drivers/i2c/chips/Kconfig
@@ -225,10 +225,4 @@ config PCA9632
This driver can also be built as a module. If so, the module
will be called pca9632.
-config LP5521
- tristate "LP5521 LED driver chip"
- depends on I2C
- help
- If you say yes here you get support for the National Semiconductor
- LP5521 LED driver.
endmenu
diff --git a/drivers/i2c/chips/Makefile b/drivers/i2c/chips/Makefile
index 656bb2b3ac8..b0dc12edb53 100644
--- a/drivers/i2c/chips/Makefile
+++ b/drivers/i2c/chips/Makefile
@@ -27,7 +27,6 @@ obj-$(CONFIG_SENSORS_TSL2550) += tsl2550.o
obj-$(CONFIG_MCU_MPC8349EMITX) += mcu_mpc8349emitx.o
obj-$(CONFIG_SENSORS_TSL256X) += tsl256x.o
obj-$(CONFIG_PCA9632) += pca9632.o
-obj-$(CONFIG_LP5521) += lp5521.o
ifeq ($(CONFIG_I2C_DEBUG_CHIP),y)
EXTRA_CFLAGS += -DDEBUG
diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index 4435859beca..022e78cd263 100644
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -177,6 +177,13 @@ config LEDS_NEO1973_GTA02
help
This option enables support for the LEDs on the FIC Neo1973.
+config LEDS_LP5521
+ tristate "LED Support for LP5521 LED I2C chip"
+ depends on LEDS_CLASS && I2C
+ help
+ If you say yes here you get support for the National Semiconductor
+ LP5521 LED driver.
+
comment "LED Triggers"
config LEDS_TRIGGERS
diff --git a/drivers/leds/Makefile b/drivers/leds/Makefile
index 40bd128f2de..ece3b56db3a 100644
--- a/drivers/leds/Makefile
+++ b/drivers/leds/Makefile
@@ -25,6 +25,7 @@ obj-$(CONFIG_LEDS_DA903X) += leds-da903x.o
obj-$(CONFIG_LEDS_HP_DISK) += leds-hp-disk.o
obj-$(CONFIG_LEDS_NEO1973_VIBRATOR) += leds-neo1973-vibrator.o
obj-$(CONFIG_LEDS_NEO1973_GTA02) += leds-neo1973-gta02.o
+obj-$(CONFIG_LEDS_LP5521) += leds-lp5521.o
# LED Triggers
obj-$(CONFIG_LEDS_TRIGGER_TIMER) += ledtrig-timer.o
diff --git a/drivers/i2c/chips/lp5521.c b/drivers/leds/leds-lp5521.c
index 33dca6632ce..62d68fd5258 100644
--- a/drivers/i2c/chips/lp5521.c
+++ b/drivers/leds/leds-lp5521.c
@@ -1,5 +1,5 @@
/*
- * drivers/i2c/chips/lp5521.c
+ * drivers/leds/leds-lp5521.c
*
* Copyright (C) 2007 Nokia Corporation
*
@@ -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) {