.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Marvell PXA27x family pin control |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2015 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> |
---|
.. | .. |
---|
512 | 508 | void __iomem *base_af[8]; |
---|
513 | 509 | void __iomem *base_dir[4]; |
---|
514 | 510 | void __iomem *base_sleep[4]; |
---|
515 | | - struct resource *res; |
---|
516 | 511 | |
---|
517 | | - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
---|
518 | | - base_af[0] = devm_ioremap_resource(&pdev->dev, res); |
---|
| 512 | + base_af[0] = devm_platform_ioremap_resource(pdev, 0); |
---|
519 | 513 | if (IS_ERR(base_af[0])) |
---|
520 | 514 | return PTR_ERR(base_af[0]); |
---|
521 | 515 | |
---|
522 | | - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); |
---|
523 | | - base_dir[0] = devm_ioremap_resource(&pdev->dev, res); |
---|
| 516 | + base_dir[0] = devm_platform_ioremap_resource(pdev, 1); |
---|
524 | 517 | if (IS_ERR(base_dir[0])) |
---|
525 | 518 | return PTR_ERR(base_dir[0]); |
---|
526 | 519 | |
---|
527 | | - res = platform_get_resource(pdev, IORESOURCE_MEM, 2); |
---|
528 | | - base_dir[3] = devm_ioremap_resource(&pdev->dev, res); |
---|
| 520 | + base_dir[3] = devm_platform_ioremap_resource(pdev, 2); |
---|
529 | 521 | if (IS_ERR(base_dir[3])) |
---|
530 | 522 | return PTR_ERR(base_dir[3]); |
---|
531 | 523 | |
---|
532 | | - res = platform_get_resource(pdev, IORESOURCE_MEM, 3); |
---|
533 | | - base_sleep[0] = devm_ioremap_resource(&pdev->dev, res); |
---|
| 524 | + base_sleep[0] = devm_platform_ioremap_resource(pdev, 3); |
---|
534 | 525 | if (IS_ERR(base_sleep[0])) |
---|
535 | 526 | return PTR_ERR(base_sleep[0]); |
---|
536 | 527 | |
---|