forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/pinctrl/mvebu/pinctrl-orion.c
....@@ -1,12 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Marvell Orion pinctrl driver based on mvebu pinctrl core
34 *
45 * 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.
106 *
117 * The first 16 MPP pins on Orion are easy to handle: they are
128 * configured through 2 consecutive registers, located at the base
....@@ -224,17 +220,14 @@
224220 {
225221 const struct of_device_id *match =
226222 of_match_device(orion_pinctrl_of_match, &pdev->dev);
227
- struct resource *res;
228223
229224 pdev->dev.platform_data = (void*)match->data;
230225
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);
233227 if (IS_ERR(mpp_base))
234228 return PTR_ERR(mpp_base);
235229
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);
238231 if (IS_ERR(high_mpp_base))
239232 return PTR_ERR(high_mpp_base);
240233