From: Marek Szyprowski Date: Thu, 19 Jan 2017 13:48:42 +0000 (+0100) Subject: soc: samsung: pmu: Use of_device_get_match_data helper X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ec7cc5b15ecc919e3d8c986a528bcc8fb8d76e8a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git soc: samsung: pmu: Use of_device_get_match_data helper Replace custom code with generic helper to retrieve driver data. Signed-off-by: Marek Szyprowski Reviewed-by: Tomasz Figa Signed-off-by: Krzysztof Kozlowski --- diff --git a/drivers/soc/samsung/exynos-pmu.c b/drivers/soc/samsung/exynos-pmu.c index 5c269bf23210..1f914e63dcc6 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; @@ -122,10 +122,7 @@ static int exynos_pmu_probe(struct platform_device *pdev) 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();