forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
....@@ -1,15 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (c) 2015, Sony Mobile Communications AB.
34 * Copyright (c) 2013, The Linux Foundation. All rights reserved.
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License version 2 and
7
- * only version 2 as published by the Free Software Foundation.
8
- *
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
135 */
146
157 #include <linux/module.h>
....@@ -20,7 +12,7 @@
2012 #include <linux/pinctrl/pinconf-generic.h>
2113 #include <linux/slab.h>
2214 #include <linux/regmap.h>
23
-#include <linux/gpio.h>
15
+#include <linux/gpio/driver.h>
2416 #include <linux/interrupt.h>
2517 #include <linux/of_device.h>
2618 #include <linux/of_irq.h>
....@@ -438,7 +430,7 @@
438430 .pin_config_group_set = pm8xxx_pin_config_set,
439431 };
440432
441
-static struct pinctrl_desc pm8xxx_pinctrl_desc = {
433
+static const struct pinctrl_desc pm8xxx_pinctrl_desc = {
442434 .name = "pm8xxx_mpp",
443435 .pctlops = &pm8xxx_pinctrl_ops,
444436 .pmxops = &pm8xxx_pinmux_ops,
....@@ -625,7 +617,6 @@
625617 }
626618 break;
627619 }
628
-
629620 }
630621
631622 static void pm8xxx_mpp_dbg_show(struct seq_file *s, struct gpio_chip *chip)
....@@ -799,11 +790,8 @@
799790 for (i = 0; i < pctrl->desc.npins; i++) {
800791 pin_data[i].reg = SSBI_REG_ADDR_MPP(i);
801792 pin_data[i].irq = platform_get_irq(pdev, i);
802
- if (pin_data[i].irq < 0) {
803
- dev_err(&pdev->dev,
804
- "missing interrupts for pin %d\n", i);
793
+ if (pin_data[i].irq < 0)
805794 return pin_data[i].irq;
806
- }
807795
808796 ret = pm8xxx_pin_populate(pctrl, &pin_data[i]);
809797 if (ret)