]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/soc/samsung/exynos-pmu.c
Merge tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[karo-tx-linux.git] / drivers / soc / samsung / exynos-pmu.c
index 5c269bf23210cbb1370cd6120283aa5b21aaff9a..813df6e7292d7ac4cbf25d33d0e5e166dce6e14b 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <linux/of.h>
 #include <linux/of_address.h>
+#include <linux/of_device.h>
 #include <linux/mfd/syscon.h>
 #include <linux/platform_device.h>
 #include <linux/delay.h>
@@ -105,7 +106,6 @@ EXPORT_SYMBOL_GPL(exynos_get_pmu_regmap);
 
 static int exynos_pmu_probe(struct platform_device *pdev)
 {
-       const struct of_device_id *match;
        struct device *dev = &pdev->dev;
        struct resource *res;
 
@@ -117,15 +117,10 @@ static int exynos_pmu_probe(struct platform_device *pdev)
        pmu_context = devm_kzalloc(&pdev->dev,
                        sizeof(struct exynos_pmu_context),
                        GFP_KERNEL);
-       if (!pmu_context) {
-               dev_err(dev, "Cannot allocate memory.\n");
+       if (!pmu_context)
                return -ENOMEM;
-       }
        pmu_context->dev = dev;
-
-       match = of_match_node(exynos_pmu_of_device_ids, dev->of_node);
-
-       pmu_context->pmu_data = match->data;
+       pmu_context->pmu_data = of_device_get_match_data(dev);
 
        if (pmu_context->pmu_data->pmu_init)
                pmu_context->pmu_data->pmu_init();