aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinmux.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pinctrl/pinmux.c')
-rw-r--r--drivers/pinctrl/pinmux.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c
index 0916222dd7d2..a76a348321bb 100644
--- a/drivers/pinctrl/pinmux.c
+++ b/drivers/pinctrl/pinmux.c
@@ -1063,18 +1063,19 @@ static int pinmux_functions_show(struct seq_file *s, void *what)
1063static int pinmux_pins_show(struct seq_file *s, void *what) 1063static int pinmux_pins_show(struct seq_file *s, void *what)
1064{ 1064{
1065 struct pinctrl_dev *pctldev = s->private; 1065 struct pinctrl_dev *pctldev = s->private;
1066 unsigned pin; 1066 unsigned i, pin;
1067 1067
1068 seq_puts(s, "Pinmux settings per pin\n"); 1068 seq_puts(s, "Pinmux settings per pin\n");
1069 seq_puts(s, "Format: pin (name): pinmuxfunction\n"); 1069 seq_puts(s, "Format: pin (name): pinmuxfunction\n");
1070 1070
1071 /* The highest pin number need to be included in the loop, thus <= */ 1071 /* The pin number can be retrived from the pin controller descriptor */
1072 for (pin = 0; pin <= pctldev->desc->maxpin; pin++) { 1072 for (i = 0; i < pctldev->desc->npins; i++) {
1073 1073
1074 struct pin_desc *desc; 1074 struct pin_desc *desc;
1075 1075
1076 pin = pctldev->desc->pins[i].number;
1076 desc = pin_desc_get(pctldev, pin); 1077 desc = pin_desc_get(pctldev, pin);
1077 /* Pin space may be sparse */ 1078 /* Skip if we cannot search the pin */
1078 if (desc == NULL) 1079 if (desc == NULL)
1079 continue; 1080 continue;
1080 1081