All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Pargmann <mpa@pengutronix.de>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Shawn Guo <shawn.guo@linaro.org>,
	linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de,
	Markus Pargmann <mpa@pengutronix.de>, <stable@vger.kernel.org>
Subject: [PATCH] pinctrl: imx1-core: Fix debug output pin array index
Date: Wed,  8 Jul 2015 16:16:06 +0200	[thread overview]
Message-ID: <1436364966-19778-1-git-send-email-mpa@pengutronix.de> (raw)

The pins do not have a 1:1 mapping from index to pin_id. Unfortunately
the debug output assumes exactly that.

The first driver using imx1-core was imx27, which had exactly this 1:1
mapping. It was accidently removed when removing all unused pads which
were listed:
	607af165c047 (pinctrl: i.MX27: Remove nonexistent pad definitions)

The patch fixes this issue by printing the pin_id directly and not the
pin name.

Cc: <stable@vger.kernel.org>
Reported-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
 drivers/pinctrl/freescale/pinctrl-imx1-core.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/pinctrl/freescale/pinctrl-imx1-core.c b/drivers/pinctrl/freescale/pinctrl-imx1-core.c
index 5fd4437cee15..f08858769167 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx1-core.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx1-core.c
@@ -403,14 +403,12 @@ static int imx1_pinconf_set(struct pinctrl_dev *pctldev,
 			     unsigned num_configs)
 {
 	struct imx1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev);
-	const struct imx1_pinctrl_soc_info *info = ipctl->info;
 	int i;
 
 	for (i = 0; i != num_configs; ++i) {
 		imx1_write_bit(ipctl, pin_id, configs[i] & 0x01, MX1_PUEN);
 
-		dev_dbg(ipctl->dev, "pinconf set pullup pin %s\n",
-			info->pins[pin_id].name);
+		dev_dbg(ipctl->dev, "pinconf set pullup pin %d\n", pin_id);
 	}
 
 	return 0;
-- 
2.1.4


WARNING: multiple messages have this Message-ID (diff)
From: mpa@pengutronix.de (Markus Pargmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] pinctrl: imx1-core: Fix debug output pin array index
Date: Wed,  8 Jul 2015 16:16:06 +0200	[thread overview]
Message-ID: <1436364966-19778-1-git-send-email-mpa@pengutronix.de> (raw)

The pins do not have a 1:1 mapping from index to pin_id. Unfortunately
the debug output assumes exactly that.

The first driver using imx1-core was imx27, which had exactly this 1:1
mapping. It was accidently removed when removing all unused pads which
were listed:
	607af165c047 (pinctrl: i.MX27: Remove nonexistent pad definitions)

The patch fixes this issue by printing the pin_id directly and not the
pin name.

Cc: <stable@vger.kernel.org>
Reported-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
 drivers/pinctrl/freescale/pinctrl-imx1-core.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/pinctrl/freescale/pinctrl-imx1-core.c b/drivers/pinctrl/freescale/pinctrl-imx1-core.c
index 5fd4437cee15..f08858769167 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx1-core.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx1-core.c
@@ -403,14 +403,12 @@ static int imx1_pinconf_set(struct pinctrl_dev *pctldev,
 			     unsigned num_configs)
 {
 	struct imx1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev);
-	const struct imx1_pinctrl_soc_info *info = ipctl->info;
 	int i;
 
 	for (i = 0; i != num_configs; ++i) {
 		imx1_write_bit(ipctl, pin_id, configs[i] & 0x01, MX1_PUEN);
 
-		dev_dbg(ipctl->dev, "pinconf set pullup pin %s\n",
-			info->pins[pin_id].name);
+		dev_dbg(ipctl->dev, "pinconf set pullup pin %d\n", pin_id);
 	}
 
 	return 0;
-- 
2.1.4

             reply	other threads:[~2015-07-08 14:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-08 14:16 Markus Pargmann [this message]
2015-07-08 14:16 ` [PATCH] pinctrl: imx1-core: Fix debug output pin array index Markus Pargmann
2015-07-09  7:12 ` Uwe Kleine-König
2015-07-09  7:12   ` Uwe Kleine-König
2015-07-09  8:28   ` Chris Ruehl
2015-07-09  8:28     ` Chris Ruehl
2015-07-09 13:30     ` Markus Pargmann
2015-07-09 13:30       ` Markus Pargmann
2015-07-09 18:06       ` Uwe Kleine-König
2015-07-09 18:06         ` Uwe Kleine-König
2015-07-10 10:02         ` Markus Pargmann
2015-07-10 10:02           ` Markus Pargmann
2015-07-10  1:24       ` Chris Ruehl
2015-07-10  1:24         ` Chris Ruehl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1436364966-19778-1-git-send-email-mpa@pengutronix.de \
    --to=mpa@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=shawn.guo@linaro.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.