diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-01 02:52:25 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-01 02:52:25 +0300 |
commit | 4b8d8ab566932bfe023637025c76c0e90c655faf (patch) | |
tree | f16cbc0f27659246c117ba68ec090ee8f6369c2a /drivers | |
parent | c5e18af910f4bc2e3d0732ea98b99c0fd884e73c (diff) | |
parent | 8dd2c9e3128a5784a01084b52d5bb7efd4371ac6 (diff) | |
download | linux-4b8d8ab566932bfe023637025c76c0e90c655faf.tar.xz |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
leds: Fix bounds checking of wm8350->pmic.led
regulator: move bq24022 init back to module_init instead of subsys_initcall
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/regulator/bq24022.c | 6 | ||||
-rw-r--r-- | drivers/regulator/wm8350-regulator.c | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/drivers/regulator/bq24022.c b/drivers/regulator/bq24022.c index 366565aba865..c175e38a4cd5 100644 --- a/drivers/regulator/bq24022.c +++ b/drivers/regulator/bq24022.c @@ -152,11 +152,7 @@ static void __exit bq24022_exit(void) platform_driver_unregister(&bq24022_driver); } -/* - * make sure this is probed before gpio_vbus and pda_power, - * but after asic3 or other GPIO expander drivers. - */ -subsys_initcall(bq24022_init); +module_init(bq24022_init); module_exit(bq24022_exit); MODULE_AUTHOR("Philipp Zabel"); diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c index 7aa35248181b..5056e23e4414 100644 --- a/drivers/regulator/wm8350-regulator.c +++ b/drivers/regulator/wm8350-regulator.c @@ -1435,7 +1435,7 @@ int wm8350_register_led(struct wm8350 *wm8350, int lednum, int dcdc, int isink, struct platform_device *pdev; int ret; - if (lednum > ARRAY_SIZE(wm8350->pmic.led) || lednum < 0) { + if (lednum >= ARRAY_SIZE(wm8350->pmic.led) || lednum < 0) { dev_err(wm8350->dev, "Invalid LED index %d\n", lednum); return -ENODEV; } |