From: Florian Fainelli Date: Tue, 8 Sep 2009 15:24:06 +0000 (+0000) Subject: prevent gpio-buttons registration failure X-Git-Tag: reboot~22477 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b9c0291e32ce238d206cd51850dc02b17e19d0ad;p=oweals%2Fopenwrt.git prevent gpio-buttons registration failure SVN-Revision: 17542 --- 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 b0497767cd..5f21516096 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; }