From: jbrunet@baylibre.com (Jerome Brunet)
To: linus-amlogic@lists.infradead.org
Subject: [PATCH 1/2] clk: meson: use dev pointer where possible
Date: Thu, 18 Jan 2018 13:08:30 +0100 [thread overview]
Message-ID: <20180118120831.8349-2-jbrunet@baylibre.com> (raw)
In-Reply-To: <20180118120831.8349-1-jbrunet@baylibre.com>
The 'dev' pointer is directly available in gxbb and axg clock
controller, so consistently use it instead of going the through the
'pdev' pointer once in while
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
drivers/clk/meson/axg.c | 8 ++++----
drivers/clk/meson/gxbb.c | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/clk/meson/axg.c b/drivers/clk/meson/axg.c
index 1294f3ad7cd5..87aba8e871a0 100644
--- a/drivers/clk/meson/axg.c
+++ b/drivers/clk/meson/axg.c
@@ -873,7 +873,7 @@ static int axg_clkc_probe(struct platform_device *pdev)
void __iomem *clk_base;
int ret, clkid, i;
- clkc_data = of_device_get_match_data(&pdev->dev);
+ clkc_data = of_device_get_match_data(dev);
if (!clkc_data)
return -EINVAL;
@@ -881,9 +881,9 @@ static int axg_clkc_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res)
return -EINVAL;
- clk_base = devm_ioremap(&pdev->dev, res->start, resource_size(res));
+ clk_base = devm_ioremap(dev, res->start, resource_size(res));
if (!clk_base) {
- dev_err(&pdev->dev, "Unable to map clk base\n");
+ dev_err(dev, "Unable to map clk base\n");
return -ENXIO;
}
@@ -918,7 +918,7 @@ static int axg_clkc_probe(struct platform_device *pdev)
ret = devm_clk_hw_register(dev,
clkc_data->hw_onecell_data->hws[clkid]);
if (ret) {
- dev_err(&pdev->dev, "Clock registration failed\n");
+ dev_err(dev, "Clock registration failed\n");
return ret;
}
}
diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c
index af24455af5b4..ba1023983d79 100644
--- a/drivers/clk/meson/gxbb.c
+++ b/drivers/clk/meson/gxbb.c
@@ -1976,7 +1976,7 @@ static int gxbb_clkc_probe(struct platform_device *pdev)
int ret, clkid, i;
struct device *dev = &pdev->dev;
- clkc_data = of_device_get_match_data(&pdev->dev);
+ clkc_data = of_device_get_match_data(dev);
if (!clkc_data)
return -EINVAL;
--
2.14.3
next prev parent reply other threads:[~2018-01-18 12:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-18 12:08 [PATCH 0/2] clk: meson: probe clean-ups Jerome Brunet
2018-01-18 12:08 ` Jerome Brunet [this message]
2018-01-18 15:25 ` [PATCH 1/2] clk: meson: use dev pointer where possible Neil Armstrong
2018-01-18 12:08 ` [PATCH 2/2] clk: meson: use devm_of_clk_add_hw_provider Jerome Brunet
2018-01-18 15:25 ` Neil Armstrong
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=20180118120831.8349-2-jbrunet@baylibre.com \
--to=jbrunet@baylibre.com \
--cc=linus-amlogic@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
all inboxes | Powered by JetHome®