Merge tag 'perf-tools-2020-12-24' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / drivers / leds / leds-lt3593.c
index 9079850..68e0643 100644 (file)
@@ -68,7 +68,7 @@ static int lt3593_led_probe(struct platform_device *pdev)
        struct led_init_data init_data = {};
        const char *tmp;
 
-       if (!dev->of_node)
+       if (!dev_of_node(dev))
                return -ENODEV;
 
        led_data = devm_kzalloc(dev, sizeof(*led_data), GFP_KERNEL);
@@ -86,9 +86,6 @@ static int lt3593_led_probe(struct platform_device *pdev)
 
        child = device_get_next_child_node(dev, NULL);
 
-       fwnode_property_read_string(child, "linux,default-trigger",
-                                   &led_data->cdev.default_trigger);
-
        if (!fwnode_property_read_string(child, "default-state", &tmp)) {
                if (!strcmp(tmp, "on"))
                        state = LEDS_GPIO_DEFSTATE_ON;
@@ -107,7 +104,6 @@ static int lt3593_led_probe(struct platform_device *pdev)
                return ret;
        }
 
-       led_data->cdev.dev->of_node = dev->of_node;
        platform_set_drvdata(pdev, led_data);
 
        return 0;