[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191215140522.30872-2-tiny.windzz@gmail.com>
Date: Sun, 15 Dec 2019 14:05:22 +0000
From: Yangtao Li <tiny.windzz@...il.com>
To: rjw@...ysocki.net, viresh.kumar@...aro.org,
thierry.reding@...il.com, jonathanh@...dia.com
Cc: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-tegra@...r.kernel.org, Yangtao Li <tiny.windzz@...il.com>
Subject: [PATCH 2/2] cpufreq: tegra186: convert to devm_platform_ioremap_resource
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <tiny.windzz@...il.com>
---
drivers/cpufreq/tegra186-cpufreq.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/cpufreq/tegra186-cpufreq.c b/drivers/cpufreq/tegra186-cpufreq.c
index bcecb068b51b..2e233ad72758 100644
--- a/drivers/cpufreq/tegra186-cpufreq.c
+++ b/drivers/cpufreq/tegra186-cpufreq.c
@@ -187,7 +187,6 @@ static int tegra186_cpufreq_probe(struct platform_device *pdev)
{
struct tegra186_cpufreq_data *data;
struct tegra_bpmp *bpmp;
- struct resource *res;
unsigned int i = 0, err;
data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
@@ -205,8 +204,7 @@ static int tegra186_cpufreq_probe(struct platform_device *pdev)
if (IS_ERR(bpmp))
return PTR_ERR(bpmp);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- data->regs = devm_ioremap_resource(&pdev->dev, res);
+ data->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(data->regs)) {
err = PTR_ERR(data->regs);
goto put_bpmp;
--
2.17.1
Powered by blists - more mailing lists