提交 ebe8f7e5 编写于 作者: A Arnout Vandecappelle (Essensium/Mind) 提交者: Tony Lindgren

OMAP3 EVM: remove out-of-bounds array access of gpio_leds

Otherwise we can get the following warning on some compilers:

arch/arm/mach-omap2/board-omap3evm.c:384:11:
warning: array subscript is above array bounds

The omap3evm BSP enables a GPIO LED on the twl4030 chip.  However,
the static gpio_leds array doesn't have an entry for it.  This is
most likely a copy-and-paste error, because it has been in there
since the first commit of the omap3evm BSP (53c5ec31).
Signed-off-by: NArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
[tony@atomide.com: updated comments with the warning]
Signed-off-by: NTony Lindgren <tony@atomide.com>
上级 856c5403
...@@ -381,7 +381,7 @@ static int omap3evm_twl_gpio_setup(struct device *dev, ...@@ -381,7 +381,7 @@ static int omap3evm_twl_gpio_setup(struct device *dev,
gpio_request_one(gpio + 7, GPIOF_OUT_INIT_LOW, "EN_DVI"); gpio_request_one(gpio + 7, GPIOF_OUT_INIT_LOW, "EN_DVI");
/* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */ /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */
gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; gpio_leds[0].gpio = gpio + TWL4030_GPIO_MAX + 1;
platform_device_register(&leds_gpio); platform_device_register(&leds_gpio);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册