leds-gpio: fix default state handling on OF platforms
[safe/jmp/linux-2.6] / drivers / leds / leds-gpio.c
index e5225d2..0823e26 100644 (file)
@@ -211,7 +211,6 @@ static int __devinit of_gpio_leds_probe(struct of_device *ofdev,
                                        const struct of_device_id *match)
 {
        struct device_node *np = ofdev->node, *child;
-       struct gpio_led led;
        struct gpio_led_of_platform_data *pdata;
        int count = 0, ret;
 
@@ -226,8 +225,8 @@ static int __devinit of_gpio_leds_probe(struct of_device *ofdev,
        if (!pdata)
                return -ENOMEM;
 
-       memset(&led, 0, sizeof(led));
        for_each_child_of_node(np, child) {
+               struct gpio_led led = {};
                enum of_gpio_flags flags;
                const char *state;