fix gpio-leds, and gpio-buttons platform data initialization
authorGabor Juhos <juhosg@openwrt.org>
Mon, 24 Nov 2008 11:03:18 +0000 (11:03 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Mon, 24 Nov 2008 11:03:18 +0000 (11:03 +0000)
SVN-Revision: 13337

target/linux/ar71xx/files/arch/mips/ar71xx/platform.c

index aa4711d34e48f126ad251e6a4eb413bb338830e3..1ebbe748b0f4b254059ff1434d48c0a70692bf96 100644 (file)
@@ -347,6 +347,7 @@ void __init ar71xx_add_device_leds_gpio(int id, unsigned num_leds,
        if (!pdev)
                goto err_free_leds;
 
+       memset(&pdata, 0, sizeof(pdata));
        pdata.num_leds = num_leds;
        pdata.leds = leds;
 
@@ -387,6 +388,7 @@ void __init ar71xx_add_device_gpio_buttons(int id,
        if (!pdev)
                goto err_free_buttons;
 
+       memset(&pdata, 0, sizeof(pdata));
        pdata.poll_interval = poll_interval;
        pdata.nbuttons = nbuttons;
        pdata.buttons = p;