Commit 308beafc authored by Yangtao Li's avatar Yangtao Li Committed by Viresh Kumar

cpufreq: tegra186: convert to devm_platform_ioremap_resource

Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: default avatarYangtao Li <tiny.windzz@gmail.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent af9c8e91
...@@ -187,7 +187,6 @@ static int tegra186_cpufreq_probe(struct platform_device *pdev) ...@@ -187,7 +187,6 @@ static int tegra186_cpufreq_probe(struct platform_device *pdev)
{ {
struct tegra186_cpufreq_data *data; struct tegra186_cpufreq_data *data;
struct tegra_bpmp *bpmp; struct tegra_bpmp *bpmp;
struct resource *res;
unsigned int i = 0, err; unsigned int i = 0, err;
data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
...@@ -205,8 +204,7 @@ static int tegra186_cpufreq_probe(struct platform_device *pdev) ...@@ -205,8 +204,7 @@ static int tegra186_cpufreq_probe(struct platform_device *pdev)
if (IS_ERR(bpmp)) if (IS_ERR(bpmp))
return PTR_ERR(bpmp); return PTR_ERR(bpmp);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); data->regs = devm_platform_ioremap_resource(pdev, 0);
data->regs = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(data->regs)) { if (IS_ERR(data->regs)) {
err = PTR_ERR(data->regs); err = PTR_ERR(data->regs);
goto put_bpmp; goto put_bpmp;
......
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