of: Remove duplicate fields from of_platform_driver
[pandora-kernel.git] / drivers / leds / leds-gpio.c
index 0823e26..6d94b0b 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/leds.h>
+#include <linux/slab.h>
 #include <linux/workqueue.h>
 
 #include <asm/gpio.h>
@@ -210,7 +211,7 @@ struct gpio_led_of_platform_data {
 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 device_node *np = ofdev->dev.of_node, *child;
        struct gpio_led_of_platform_data *pdata;
        int count = 0, ret;
 
@@ -290,8 +291,8 @@ static struct of_platform_driver of_gpio_leds_driver = {
        .driver = {
                .name = "of_gpio_leds",
                .owner = THIS_MODULE,
+               .of_match_table = of_gpio_leds_match,
        },
-       .match_table = of_gpio_leds_match,
        .probe = of_gpio_leds_probe,
        .remove = __devexit_p(of_gpio_leds_remove),
 };