.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Marvell PXA25x family pin control |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2016 Robert Jarzmik |
---|
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; version 2 of the License. |
---|
9 | | - * |
---|
10 | 6 | */ |
---|
11 | 7 | #include <linux/module.h> |
---|
12 | 8 | #include <linux/platform_device.h> |
---|
.. | .. |
---|
220 | 216 | void __iomem *base_af[8]; |
---|
221 | 217 | void __iomem *base_dir[4]; |
---|
222 | 218 | void __iomem *base_sleep[4]; |
---|
223 | | - struct resource *res; |
---|
224 | 219 | |
---|
225 | | - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
---|
226 | | - base_af[0] = devm_ioremap_resource(&pdev->dev, res); |
---|
| 220 | + base_af[0] = devm_platform_ioremap_resource(pdev, 0); |
---|
227 | 221 | if (IS_ERR(base_af[0])) |
---|
228 | 222 | return PTR_ERR(base_af[0]); |
---|
229 | 223 | |
---|
230 | | - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); |
---|
231 | | - base_dir[0] = devm_ioremap_resource(&pdev->dev, res); |
---|
| 224 | + base_dir[0] = devm_platform_ioremap_resource(pdev, 1); |
---|
232 | 225 | if (IS_ERR(base_dir[0])) |
---|
233 | 226 | return PTR_ERR(base_dir[0]); |
---|
234 | 227 | |
---|
235 | | - res = platform_get_resource(pdev, IORESOURCE_MEM, 2); |
---|
236 | | - base_dir[3] = devm_ioremap_resource(&pdev->dev, res); |
---|
| 228 | + base_dir[3] = devm_platform_ioremap_resource(pdev, 2); |
---|
237 | 229 | if (IS_ERR(base_dir[3])) |
---|
238 | 230 | return PTR_ERR(base_dir[3]); |
---|
239 | 231 | |
---|
240 | | - res = platform_get_resource(pdev, IORESOURCE_MEM, 3); |
---|
241 | | - base_sleep[0] = devm_ioremap_resource(&pdev->dev, res); |
---|
| 232 | + base_sleep[0] = devm_platform_ioremap_resource(pdev, 3); |
---|
242 | 233 | if (IS_ERR(base_sleep[0])) |
---|
243 | 234 | return PTR_ERR(base_sleep[0]); |
---|
244 | 235 | |
---|