Skip to content

Commit

Permalink
soc: samsung: pmu: Use of_device_get_match_data helper
Browse files Browse the repository at this point in the history
Replace custom code with generic helper to retrieve driver data.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
  • Loading branch information
Marek Szyprowski authored and Krzysztof Kozlowski committed Jan 20, 2017
1 parent 76640b8 commit ec7cc5b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/soc/samsung/exynos-pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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;

Expand All @@ -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();
Expand Down

0 comments on commit ec7cc5b

Please sign in to comment.