Commit ec7cc5b1 authored by Marek Szyprowski's avatar Marek Szyprowski Committed by Krzysztof Kozlowski

soc: samsung: pmu: Use of_device_get_match_data helper

Replace custom code with generic helper to retrieve driver data.
Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: default avatarTomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
parent 76640b84
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/of_device.h>
#include <linux/mfd/syscon.h> #include <linux/mfd/syscon.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/delay.h> #include <linux/delay.h>
...@@ -105,7 +106,6 @@ EXPORT_SYMBOL_GPL(exynos_get_pmu_regmap); ...@@ -105,7 +106,6 @@ EXPORT_SYMBOL_GPL(exynos_get_pmu_regmap);
static int exynos_pmu_probe(struct platform_device *pdev) static int exynos_pmu_probe(struct platform_device *pdev)
{ {
const struct of_device_id *match;
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct resource *res; struct resource *res;
...@@ -122,10 +122,7 @@ static int exynos_pmu_probe(struct platform_device *pdev) ...@@ -122,10 +122,7 @@ static int exynos_pmu_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
} }
pmu_context->dev = dev; pmu_context->dev = dev;
pmu_context->pmu_data = of_device_get_match_data(dev);
match = of_match_node(exynos_pmu_of_device_ids, dev->of_node);
pmu_context->pmu_data = match->data;
if (pmu_context->pmu_data->pmu_init) if (pmu_context->pmu_data->pmu_init)
pmu_context->pmu_data->pmu_init(); pmu_context->pmu_data->pmu_init();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment