summaryrefslogtreecommitdiff
path: root/target/linux/brcm63xx
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2009-09-08 15:24:06 +0000
committerFlorian Fainelli <florian@openwrt.org>2009-09-08 15:24:06 +0000
commitb9c0291e32ce238d206cd51850dc02b17e19d0ad (patch)
tree6ba456c15848abe36ab71c1e8dd41ad06ea358d5 /target/linux/brcm63xx
parent6a7693b247672699950199a813a7f54d6a1e1492 (diff)
downloadmtk-20170518-b9c0291e32ce238d206cd51850dc02b17e19d0ad.zip
mtk-20170518-b9c0291e32ce238d206cd51850dc02b17e19d0ad.tar.gz
mtk-20170518-b9c0291e32ce238d206cd51850dc02b17e19d0ad.tar.bz2
prevent gpio-buttons registration failure
SVN-Revision: 17542
Diffstat (limited to 'target/linux/brcm63xx')
-rw-r--r--target/linux/brcm63xx/files/arch/mips/bcm63xx/boards/board_bcm963xx.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/target/linux/brcm63xx/files/arch/mips/bcm63xx/boards/board_bcm963xx.c b/target/linux/brcm63xx/files/arch/mips/bcm63xx/boards/board_bcm963xx.c
index b049776..5f21516 100644
--- a/target/linux/brcm63xx/files/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/target/linux/brcm63xx/files/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -881,10 +881,12 @@ int __init board_register_devices(void)
platform_device_register(&bcm63xx_gpio_leds);
- bcm63xx_gpio_buttons_data.nbuttons = 1,
- bcm63xx_gpio_buttons_data.buttons = board.reset_btn;
+ if (board.reset_btn) {
+ bcm63xx_gpio_buttons_data.nbuttons = 1,
+ bcm63xx_gpio_buttons_data.buttons = board.reset_btn;
- platform_device_register(&bcm63xx_gpio_buttons_device);
+ platform_device_register(&bcm63xx_gpio_buttons_device);
+ }
return 0;
}