cpufreq: tegra186: convert to devm_platform_ioremap_resource
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
This commit is contained in:
parent
af9c8e9184
commit
308beafc37
|
@ -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)
|
||||||
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;
|
||||||
|
|
Loading…
Reference in a new issue