X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=drivers%2Fsoc%2Fsamsung%2Fexynos-pmu.c;h=813df6e7292d7ac4cbf25d33d0e5e166dce6e14b;hb=195849ea13549dc2390b7db7d80a22d76f73dfae;hp=5c269bf23210cbb1370cd6120283aa5b21aaff9a;hpb=76640b84bd7a9d68c70d8bc8ecd02cdc4bd8855e;p=karo-tx-linux.git diff --git a/drivers/soc/samsung/exynos-pmu.c b/drivers/soc/samsung/exynos-pmu.c index 5c269bf23210..813df6e7292d 100644 --- a/drivers/soc/samsung/exynos-pmu.c +++ b/drivers/soc/samsung/exynos-pmu.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include @@ -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();