From: m.szyprowski@samsung.com (Marek Szyprowski)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 02/13] soc: samsung: pmu: Use of_device_get_match_data helper
Date: Tue, 17 Jan 2017 13:44:33 +0100 [thread overview]
Message-ID: <1484657084-26227-3-git-send-email-m.szyprowski@samsung.com> (raw)
In-Reply-To: <1484657084-26227-1-git-send-email-m.szyprowski@samsung.com>
Replace custom code with generic helper to retrieve driver data.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
drivers/soc/samsung/exynos-pmu.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
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 <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 @@ struct regmap *exynos_get_pmu_regmap(void)
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();
--
1.9.1
next prev parent reply other threads:[~2017-01-17 12:44 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170117124453eucas1p1b812596939db4c4f3298b941555eb05a@eucas1p1.samsung.com>
2017-01-17 12:44 ` [PATCH v2 00/13] Move pad retention control to Exynos pin controller driver Marek Szyprowski
2017-01-17 12:44 ` [PATCH v2 01/13] soc: samsung: pmu: Provide global function to get PMU regmap Marek Szyprowski
2017-01-18 8:31 ` Tomasz Figa
2017-01-17 12:44 ` Marek Szyprowski [this message]
2017-01-17 12:44 ` [PATCH v2 03/13] soc: samsung: pmu: Remove messages for failed memory allocation Marek Szyprowski
2017-01-17 12:44 ` [PATCH v2 04/13] pinctrl: samsung: Document Exynos3250 SoC support Marek Szyprowski
2017-01-17 12:44 ` [PATCH v2 05/13] pinctrl: samsung: Remove messages for failed memory allocation Marek Szyprowski
2017-01-17 12:44 ` [PATCH v2 06/13] pinctrl: samsung: Fix samsung_pinctrl_create_functions return value Marek Szyprowski
2017-01-17 17:36 ` Krzysztof Kozlowski
2017-01-17 12:44 ` [PATCH v2 07/13] pinctrl: samsung: Add missing initconst annotation Marek Szyprowski
2017-01-17 12:44 ` [PATCH v2 08/13] pinctrl: samsung: Remove dead code Marek Szyprowski
2017-01-17 12:44 ` [PATCH v2 09/13] pinctrl: samsung: Use generic of_device_get_match_data helper Marek Szyprowski
2017-01-17 17:38 ` Krzysztof Kozlowski
2017-01-17 12:44 ` [PATCH v2 10/13] pinctrl: samsung: Add infrastructure for pin-bank retention control Marek Szyprowski
2017-01-18 8:36 ` Tomasz Figa
2017-01-17 12:44 ` [PATCH v2 11/13] pinctrl: samsung: Move retention control from mach-exynos to the pinctrl driver Marek Szyprowski
2017-01-17 17:48 ` Krzysztof Kozlowski
2017-01-17 12:44 ` [PATCH v2 12/13] pinctrl: samsung: Move retention control from mach-s5pv210 " Marek Szyprowski
2017-01-17 17:54 ` Krzysztof Kozlowski
2017-01-17 12:44 ` [PATCH v2 13/13] pinctrl: samsung: Replace syscore ops with standard platform device pm_ops Marek Szyprowski
2017-01-18 8:40 ` [PATCH v2 00/13] Move pad retention control to Exynos pin controller driver Tomasz Figa
2017-01-18 10:39 ` Linus Walleij
2017-01-18 12:06 ` Krzysztof Kozlowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1484657084-26227-3-git-send-email-m.szyprowski@samsung.com \
--to=m.szyprowski@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox