forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/pinctrl/mvebu/pinctrl-mvebu.c
....@@ -1,13 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Marvell MVEBU pinctrl core driver
34 *
45 * Authors: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
56 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License as published by
9
- * the Free Software Foundation; either version 2 of the License, or
10
- * (at your option) any later version.
117 */
128
139 #include <linux/platform_device.h>
....@@ -17,7 +13,7 @@
1713 #include <linux/of_address.h>
1814 #include <linux/of_platform.h>
1915 #include <linux/err.h>
20
-#include <linux/gpio.h>
16
+#include <linux/gpio/driver.h>
2117 #include <linux/pinctrl/machine.h>
2218 #include <linux/pinctrl/pinconf.h>
2319 #include <linux/pinctrl/pinctrl.h>
....@@ -413,14 +409,14 @@
413409 ret = of_property_read_string(np, "marvell,function", &function);
414410 if (ret) {
415411 dev_err(pctl->dev,
416
- "missing marvell,function in node %s\n", np->name);
412
+ "missing marvell,function in node %pOFn\n", np);
417413 return 0;
418414 }
419415
420416 nmaps = of_property_count_strings(np, "marvell,pins");
421417 if (nmaps < 0) {
422418 dev_err(pctl->dev,
423
- "missing marvell,pins in node %s\n", np->name);
419
+ "missing marvell,pins in node %pOFn\n", np);
424420 return 0;
425421 }
426422
....@@ -763,12 +759,10 @@
763759 {
764760 struct mvebu_pinctrl_soc_info *soc = dev_get_platdata(&pdev->dev);
765761 struct mvebu_mpp_ctrl_data *mpp_data;
766
- struct resource *res;
767762 void __iomem *base;
768763 int i;
769764
770
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
771
- base = devm_ioremap_resource(&pdev->dev, res);
765
+ base = devm_platform_ioremap_resource(pdev, 0);
772766 if (IS_ERR(base))
773767 return PTR_ERR(base);
774768