| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Marvell Orion pinctrl driver based on mvebu pinctrl core |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Author: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 7 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 8 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 9 | | - * (at your option) any later version. |
|---|
| 10 | 6 | * |
|---|
| 11 | 7 | * The first 16 MPP pins on Orion are easy to handle: they are |
|---|
| 12 | 8 | * configured through 2 consecutive registers, located at the base |
|---|
| .. | .. |
|---|
| 224 | 220 | { |
|---|
| 225 | 221 | const struct of_device_id *match = |
|---|
| 226 | 222 | of_match_device(orion_pinctrl_of_match, &pdev->dev); |
|---|
| 227 | | - struct resource *res; |
|---|
| 228 | 223 | |
|---|
| 229 | 224 | pdev->dev.platform_data = (void*)match->data; |
|---|
| 230 | 225 | |
|---|
| 231 | | - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
|---|
| 232 | | - mpp_base = devm_ioremap_resource(&pdev->dev, res); |
|---|
| 226 | + mpp_base = devm_platform_ioremap_resource(pdev, 0); |
|---|
| 233 | 227 | if (IS_ERR(mpp_base)) |
|---|
| 234 | 228 | return PTR_ERR(mpp_base); |
|---|
| 235 | 229 | |
|---|
| 236 | | - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); |
|---|
| 237 | | - high_mpp_base = devm_ioremap_resource(&pdev->dev, res); |
|---|
| 230 | + high_mpp_base = devm_platform_ioremap_resource(pdev, 1); |
|---|
| 238 | 231 | if (IS_ERR(high_mpp_base)) |
|---|
| 239 | 232 | return PTR_ERR(high_mpp_base); |
|---|
| 240 | 233 | |
|---|