regulator: twl6030: Use of_device_get_match_data()
[linux-2.6-microblaze.git] / drivers / regulator / twl6030-regulator.c
index 219cbd9..78b9645 100644 (file)
@@ -687,14 +687,9 @@ static int twlreg_probe(struct platform_device *pdev)
        struct regulator_init_data      *initdata;
        struct regulation_constraints   *c;
        struct regulator_dev            *rdev;
-       const struct of_device_id       *match;
        struct regulator_config         config = { };
 
-       match = of_match_device(twl_of_match, &pdev->dev);
-       if (!match)
-               return -ENODEV;
-
-       template = match->data;
+       template = of_device_get_match_data(&pdev->dev);
        if (!template)
                return -ENODEV;