From: Jonathan Cameron <jic23@kernel.org>
To: Bjorn Andersson <bjorn.andersson@sonymobile.com>,
Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Johan Hovold <jhovold@gmail.com>,
Peter Meerwald <pmeerw@pmeerw.net>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 2/3] iio: light: lm3533-als: Print error message on invalid resistance
Date: Sat, 31 Oct 2015 10:06:11 +0000 [thread overview]
Message-ID: <56349293.7030107@kernel.org> (raw)
In-Reply-To: <1446249040-16552-2-git-send-email-bjorn.andersson@sonymobile.com>
On 30/10/15 23:50, Bjorn Andersson wrote:
> Print an error message to indicate that invalid configuration data was
> provided in the platform_data, rather than just aborting initialization.
>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Seems sensible to me.
Applied to the togreg branch of iio.git - initially pushed out as testing
for the autobuilders to play with it.
Thanks,
Jonathan
> ---
>
> This patch can be picked independently of the other 2, but included in the
> series for "completeness".
>
> No changes since v1 in this patch.
>
> drivers/iio/light/lm3533-als.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/iio/light/lm3533-als.c b/drivers/iio/light/lm3533-als.c
> index 076bc46fad03..e56937c40a18 100644
> --- a/drivers/iio/light/lm3533-als.c
> +++ b/drivers/iio/light/lm3533-als.c
> @@ -743,8 +743,10 @@ static int lm3533_als_set_resistor(struct lm3533_als *als, u8 val)
> {
> int ret;
>
> - if (val < LM3533_ALS_RESISTOR_MIN || val > LM3533_ALS_RESISTOR_MAX)
> + if (val < LM3533_ALS_RESISTOR_MIN || val > LM3533_ALS_RESISTOR_MAX) {
> + dev_err(&als->pdev->dev, "invalid resistor value\n");
> return -EINVAL;
> + };
>
> ret = lm3533_write(als->lm3533, LM3533_REG_ALS_RESISTOR_SELECT, val);
> if (ret) {
>
WARNING: multiple messages have this Message-ID (diff)
From: jic23@kernel.org (Jonathan Cameron)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 2/3] iio: light: lm3533-als: Print error message on invalid resistance
Date: Sat, 31 Oct 2015 10:06:11 +0000 [thread overview]
Message-ID: <56349293.7030107@kernel.org> (raw)
In-Reply-To: <1446249040-16552-2-git-send-email-bjorn.andersson@sonymobile.com>
On 30/10/15 23:50, Bjorn Andersson wrote:
> Print an error message to indicate that invalid configuration data was
> provided in the platform_data, rather than just aborting initialization.
>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Seems sensible to me.
Applied to the togreg branch of iio.git - initially pushed out as testing
for the autobuilders to play with it.
Thanks,
Jonathan
> ---
>
> This patch can be picked independently of the other 2, but included in the
> series for "completeness".
>
> No changes since v1 in this patch.
>
> drivers/iio/light/lm3533-als.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/iio/light/lm3533-als.c b/drivers/iio/light/lm3533-als.c
> index 076bc46fad03..e56937c40a18 100644
> --- a/drivers/iio/light/lm3533-als.c
> +++ b/drivers/iio/light/lm3533-als.c
> @@ -743,8 +743,10 @@ static int lm3533_als_set_resistor(struct lm3533_als *als, u8 val)
> {
> int ret;
>
> - if (val < LM3533_ALS_RESISTOR_MIN || val > LM3533_ALS_RESISTOR_MAX)
> + if (val < LM3533_ALS_RESISTOR_MIN || val > LM3533_ALS_RESISTOR_MAX) {
> + dev_err(&als->pdev->dev, "invalid resistor value\n");
> return -EINVAL;
> + };
>
> ret = lm3533_write(als->lm3533, LM3533_REG_ALS_RESISTOR_SELECT, val);
> if (ret) {
>
next prev parent reply other threads:[~2015-10-31 10:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-30 23:50 [PATCH v3 1/3] devicetree: mfd: Add binding for the TI LM3533 Bjorn Andersson
2015-10-30 23:50 ` Bjorn Andersson
2015-10-30 23:50 ` Bjorn Andersson
2015-10-30 23:50 ` [PATCH v3 2/3] iio: light: lm3533-als: Print error message on invalid resistance Bjorn Andersson
2015-10-30 23:50 ` Bjorn Andersson
2015-10-31 10:06 ` Jonathan Cameron [this message]
2015-10-31 10:06 ` Jonathan Cameron
2015-10-30 23:50 ` [PATCH v3 3/3] mfd: lm3533: Support initialization from Device Tree Bjorn Andersson
2015-10-30 23:50 ` Bjorn Andersson
2015-10-31 10:08 ` [PATCH v3 1/3] devicetree: mfd: Add binding for the TI LM3533 Jonathan Cameron
2015-10-31 10:08 ` Jonathan Cameron
2015-10-31 10:08 ` Jonathan Cameron
2015-11-06 2:23 ` Rob Herring
2015-11-06 2:23 ` Rob Herring
2015-11-06 2:23 ` Rob Herring
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=56349293.7030107@kernel.org \
--to=jic23@kernel.org \
--cc=bjorn.andersson@sonymobile.com \
--cc=jhovold@gmail.com \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
/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.