From: "Heiko Stübner" <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
To: Linus Walleij
<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Kukjin Kim <kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Tomasz Figa <t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Subject: [PATCH] i2c: s3c2410: check for NULL pinctrl handle
Date: Sat, 23 Feb 2013 18:57:46 +0100 [thread overview]
Message-ID: <201302231857.46445.heiko@sntech.de> (raw)
In-Reply-To: <201302231855.47560.heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
When pinctrl is not built the fallback functions fail silently
and emit either 0 error codes or NULL pinctrl handles.
Therefore it's needed to also check for this NULL-handle when
falling back to parsing the i2c gpios from devicetree.
Signed-off-by: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
---
drivers/i2c/busses/i2c-s3c2410.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index f6b880b..e58337f 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -1060,7 +1060,8 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
if (i2c->pdata->cfg_gpio) {
i2c->pdata->cfg_gpio(to_platform_device(i2c->dev));
- } else if (IS_ERR(i2c->pctrl) && s3c24xx_i2c_parse_dt_gpio(i2c)) {
+ } else if ((!i2c->pctrl || IS_ERR(i2c->pctrl)) &&
+ s3c24xx_i2c_parse_dt_gpio(i2c)) {
return -EINVAL;
}
--
1.7.2.3
WARNING: multiple messages have this Message-ID (diff)
From: heiko@sntech.de (Heiko Stübner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] i2c: s3c2410: check for NULL pinctrl handle
Date: Sat, 23 Feb 2013 18:57:46 +0100 [thread overview]
Message-ID: <201302231857.46445.heiko@sntech.de> (raw)
In-Reply-To: <201302231855.47560.heiko@sntech.de>
When pinctrl is not built the fallback functions fail silently
and emit either 0 error codes or NULL pinctrl handles.
Therefore it's needed to also check for this NULL-handle when
falling back to parsing the i2c gpios from devicetree.
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
drivers/i2c/busses/i2c-s3c2410.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index f6b880b..e58337f 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -1060,7 +1060,8 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
if (i2c->pdata->cfg_gpio) {
i2c->pdata->cfg_gpio(to_platform_device(i2c->dev));
- } else if (IS_ERR(i2c->pctrl) && s3c24xx_i2c_parse_dt_gpio(i2c)) {
+ } else if ((!i2c->pctrl || IS_ERR(i2c->pctrl)) &&
+ s3c24xx_i2c_parse_dt_gpio(i2c)) {
return -EINVAL;
}
--
1.7.2.3
WARNING: multiple messages have this Message-ID (diff)
From: "Heiko Stübner" <heiko@sntech.de>
To: Linus Walleij <linus.walleij@linaro.org>,
Wolfram Sang <wsa@the-dreams.de>
Cc: linux-kernel@vger.kernel.org, Kukjin Kim <kgene.kim@samsung.com>,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-i2c@vger.kernel.org,
Tomasz Figa <t.figa@samsung.com>
Subject: [PATCH] i2c: s3c2410: check for NULL pinctrl handle
Date: Sat, 23 Feb 2013 18:57:46 +0100 [thread overview]
Message-ID: <201302231857.46445.heiko@sntech.de> (raw)
In-Reply-To: <201302231855.47560.heiko@sntech.de>
When pinctrl is not built the fallback functions fail silently
and emit either 0 error codes or NULL pinctrl handles.
Therefore it's needed to also check for this NULL-handle when
falling back to parsing the i2c gpios from devicetree.
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
drivers/i2c/busses/i2c-s3c2410.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index f6b880b..e58337f 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -1060,7 +1060,8 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
if (i2c->pdata->cfg_gpio) {
i2c->pdata->cfg_gpio(to_platform_device(i2c->dev));
- } else if (IS_ERR(i2c->pctrl) && s3c24xx_i2c_parse_dt_gpio(i2c)) {
+ } else if ((!i2c->pctrl || IS_ERR(i2c->pctrl)) &&
+ s3c24xx_i2c_parse_dt_gpio(i2c)) {
return -EINVAL;
}
--
1.7.2.3
next prev parent reply other threads:[~2013-02-23 17:57 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-23 17:55 [PATCH] pinctrl or i2c-s3c2410: fix pinctrl NULL return values in stubs Heiko Stübner
2013-02-23 17:55 ` Heiko Stübner
2013-02-23 17:55 ` Heiko Stübner
[not found] ` <201302231855.47560.heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
2013-02-23 17:56 ` [PATCH] pinctrl: return real error codes when pinctrl is not included Heiko Stübner
2013-02-23 17:56 ` Heiko Stübner
2013-02-23 17:56 ` Heiko Stübner
[not found] ` <201302231856.35083.heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
2013-02-24 0:40 ` Linus Walleij
2013-02-24 0:40 ` Linus Walleij
2013-02-24 0:40 ` Linus Walleij
2013-02-24 22:34 ` Heiko Stübner
2013-02-24 22:34 ` Heiko Stübner
2013-02-24 22:34 ` Heiko Stübner
2013-02-24 22:42 ` Linus Walleij
2013-02-24 22:42 ` Linus Walleij
[not found] ` <CACRpkdbKFWcT_Oa00nd_Op5ndOEc-cEkZm6fzHRuxs0Rc+ZOeA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-02-24 23:15 ` Heiko Stübner
2013-02-24 23:15 ` Heiko Stübner
2013-02-24 23:15 ` Heiko Stübner
2013-02-23 17:57 ` Heiko Stübner [this message]
2013-02-23 17:57 ` [PATCH] i2c: s3c2410: check for NULL pinctrl handle Heiko Stübner
2013-02-23 17:57 ` Heiko Stübner
[not found] ` <201302231857.46445.heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
2013-02-24 0:16 ` Linus Walleij
2013-02-24 0:16 ` Linus Walleij
2013-02-24 0:16 ` Linus Walleij
2013-02-24 0:38 ` Tomasz Figa
2013-02-24 0:38 ` Tomasz Figa
2013-02-24 0:47 ` Linus Walleij
2013-02-24 0:47 ` Linus Walleij
[not found] ` <CACRpkdaFv=V8M_Ztb5-hrYm6YnXiG6fg6Z13y3NVFdszBk=7ZQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-02-24 0:58 ` Tomasz Figa
2013-02-24 0:58 ` Tomasz Figa
2013-02-24 0:58 ` Tomasz Figa
2013-02-24 1:01 ` Linus Walleij
2013-02-24 1:01 ` Linus Walleij
[not found] ` <CACRpkdYBjZgEo6qEyBOcYuPzpQUAZ9x-kvFabz0y0pEQs35sKw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-02-24 17:00 ` Tomasz Figa
2013-02-24 17:00 ` Tomasz Figa
2013-02-24 17:00 ` Tomasz Figa
2013-02-24 22:39 ` Linus Walleij
2013-02-24 22:39 ` Linus Walleij
2013-02-24 22:39 ` Linus Walleij
2013-02-24 23:16 ` Heiko Stübner
2013-02-24 23:16 ` Heiko Stübner
[not found] ` <201302250016.49773.heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
2013-02-25 0:02 ` Tomasz Figa
2013-02-25 0:02 ` Tomasz Figa
2013-02-25 0:02 ` Tomasz Figa
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=201302231857.46445.heiko@sntech.de \
--to=heiko-4mtyjxux2i+zqb+pc5nmwq@public.gmane.org \
--cc=kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.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.