From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Markus Pargmann <mpa@pengutronix.de>,
Linus Walleij <linus.walleij@linaro.org>,
Chris Ruehl <chris.ruehl@gtsys.com.hk>
Cc: Shawn Guo <shawn.guo@linaro.org>,
linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org,
kernel@pengutronix.de, stable@vger.kernel.org
Subject: [PATCH] Subject: pinctrl: imx1-core: Fix debug output in .pin_config_set callback
Date: Fri, 17 Jul 2015 09:38:43 +0200 [thread overview]
Message-ID: <1437118723-19217-1-git-send-email-u.kleine-koenig@pengutronix.de> (raw)
In-Reply-To: <55A85B59.5060906@gtsys.com.hk>
imx1_pinconf_set assumes that the array of pins in struct
imx1_pinctrl_soc_info can be indexed by pin id to get the
pinctrl_pin_desc for a pin. This used to be correct up to commit
607af165c047 which removed some entries from the array and so made it
wrong to access the array by pin id.
The result of this bug is a wrong pin name in the output for small pin
ids and an oops for the bigger ones.
This patch is the result of a discussion that includes patches by Markus
Pargmann and Chris Ruehl.
Fixes: 607af165c047 ("pinctrl: i.MX27: Remove nonexistent pad definitions")
Cc: stable@vger.kernel.org
Reported-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/pinctrl/freescale/pinctrl-imx1-core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/pinctrl/freescale/pinctrl-imx1-core.c b/drivers/pinctrl/freescale/pinctrl-imx1-core.c
index 5fd4437cee15..88a7fac11bd4 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx1-core.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx1-core.c
@@ -403,14 +403,13 @@ 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);
+ pin_desc_get(pctldev, pin_id)->name);
}
return 0;
--
2.1.4
next prev parent reply other threads:[~2015-07-17 7:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-26 0:26 [Resend][PATCH] Pinctrl: imx1: fix wrong pin-name resolving Chris Ruehl
2015-07-16 8:52 ` Linus Walleij
2015-07-16 11:34 ` Uwe Kleine-König
2015-07-16 14:00 ` Linus Walleij
2015-07-17 1:33 ` Chris Ruehl
2015-07-17 7:38 ` Uwe Kleine-König [this message]
2015-07-17 7:56 ` [PATCH] Subject: pinctrl: imx1-core: Fix debug output in .pin_config_set callback Markus Pargmann
2015-07-17 7:58 ` Linus Walleij
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=1437118723-19217-1-git-send-email-u.kleine-koenig@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=chris.ruehl@gtsys.com.hk \
--cc=kernel@pengutronix.de \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=mpa@pengutronix.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).