All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Brian Masney <masneyb@onstation.org>
Cc: lee.jones@linaro.org, daniel.thompson@linaro.org,
	jingoohan1@gmail.com, robh+dt@kernel.org,
	jacek.anaszewski@gmail.com, mark.rutland@arm.com,
	b.zolnierkie@samsung.com, dri-devel@lists.freedesktop.org,
	linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org,
	dmurphy@ti.com, jonathan@marek.ca
Subject: Re: [PATCH v2 1/3] backlight: lm3630a: return 0 on success in update_status functions
Date: Mon, 01 Apr 2019 21:34:07 +0000	[thread overview]
Message-ID: <20190401213407.GC14681@amd> (raw)
In-Reply-To: <20190401103034.21062-2-masneyb@onstation.org>

[-- Attachment #1: Type: text/plain, Size: 1667 bytes --]

On Mon 2019-04-01 06:30:32, Brian Masney wrote:
> lm3630a_bank_a_update_status() and lm3630a_bank_b_update_status()
> both return the brightness value if the brightness was successfully
> updated. Writing to these attributes via sysfs would cause a 'Bad
> address' error to be returned. These functions should return 0 on
> success, so let's change it to correct that error.
> 
> Signed-off-by: Brian Masney <masneyb@onstation.org>
> Fixes: 28e64a68a2ef ("backlight: lm3630: apply chip revision")

Acked-by: Pavel Machek <pavel@ucw.cz>

> ---
>  drivers/video/backlight/lm3630a_bl.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/video/backlight/lm3630a_bl.c b/drivers/video/backlight/lm3630a_bl.c
> index 2030a6b77a09..ef2553f452ca 100644
> --- a/drivers/video/backlight/lm3630a_bl.c
> +++ b/drivers/video/backlight/lm3630a_bl.c
> @@ -201,7 +201,7 @@ static int lm3630a_bank_a_update_status(struct backlight_device *bl)
>  				      LM3630A_LEDA_ENABLE, LM3630A_LEDA_ENABLE);
>  	if (ret < 0)
>  		goto out_i2c_err;
> -	return bl->props.brightness;
> +	return 0;
>  
>  out_i2c_err:
>  	dev_err(pchip->dev, "i2c failed to access\n");
> @@ -278,7 +278,7 @@ static int lm3630a_bank_b_update_status(struct backlight_device *bl)
>  				      LM3630A_LEDB_ENABLE, LM3630A_LEDB_ENABLE);
>  	if (ret < 0)
>  		goto out_i2c_err;
> -	return bl->props.brightness;
> +	return 0;
>  
>  out_i2c_err:
>  	dev_err(pchip->dev, "i2c failed to access REG_CTRL\n");

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Pavel Machek <pavel@ucw.cz>
To: Brian Masney <masneyb@onstation.org>
Cc: lee.jones@linaro.org, daniel.thompson@linaro.org,
	jingoohan1@gmail.com, robh+dt@kernel.org,
	jacek.anaszewski@gmail.com, mark.rutland@arm.com,
	b.zolnierkie@samsung.com, dri-devel@lists.freedesktop.org,
	linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org,
	dmurphy@ti.com, jonathan@marek.ca
Subject: Re: [PATCH v2 1/3] backlight: lm3630a: return 0 on success in update_status functions
Date: Mon, 1 Apr 2019 23:34:07 +0200	[thread overview]
Message-ID: <20190401213407.GC14681@amd> (raw)
In-Reply-To: <20190401103034.21062-2-masneyb@onstation.org>

[-- Attachment #1: Type: text/plain, Size: 1667 bytes --]

On Mon 2019-04-01 06:30:32, Brian Masney wrote:
> lm3630a_bank_a_update_status() and lm3630a_bank_b_update_status()
> both return the brightness value if the brightness was successfully
> updated. Writing to these attributes via sysfs would cause a 'Bad
> address' error to be returned. These functions should return 0 on
> success, so let's change it to correct that error.
> 
> Signed-off-by: Brian Masney <masneyb@onstation.org>
> Fixes: 28e64a68a2ef ("backlight: lm3630: apply chip revision")

Acked-by: Pavel Machek <pavel@ucw.cz>

> ---
>  drivers/video/backlight/lm3630a_bl.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/video/backlight/lm3630a_bl.c b/drivers/video/backlight/lm3630a_bl.c
> index 2030a6b77a09..ef2553f452ca 100644
> --- a/drivers/video/backlight/lm3630a_bl.c
> +++ b/drivers/video/backlight/lm3630a_bl.c
> @@ -201,7 +201,7 @@ static int lm3630a_bank_a_update_status(struct backlight_device *bl)
>  				      LM3630A_LEDA_ENABLE, LM3630A_LEDA_ENABLE);
>  	if (ret < 0)
>  		goto out_i2c_err;
> -	return bl->props.brightness;
> +	return 0;
>  
>  out_i2c_err:
>  	dev_err(pchip->dev, "i2c failed to access\n");
> @@ -278,7 +278,7 @@ static int lm3630a_bank_b_update_status(struct backlight_device *bl)
>  				      LM3630A_LEDB_ENABLE, LM3630A_LEDB_ENABLE);
>  	if (ret < 0)
>  		goto out_i2c_err;
> -	return bl->props.brightness;
> +	return 0;
>  
>  out_i2c_err:
>  	dev_err(pchip->dev, "i2c failed to access REG_CTRL\n");

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2019-04-01 21:34 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-01 10:30 [PATCH v2 0/3] backlight: lm3630a: bug fix and device tree support Brian Masney
2019-04-01 10:30 ` Brian Masney
2019-04-01 10:30 ` [PATCH v2 1/3] backlight: lm3630a: return 0 on success in update_status functions Brian Masney
2019-04-01 10:30   ` Brian Masney
2019-04-01 21:34   ` Pavel Machek [this message]
2019-04-01 21:34     ` Pavel Machek
2019-04-01 10:30 ` [PATCH v2 2/3] dt-bindings: backlight: add lm3630a bindings Brian Masney
2019-04-01 10:30   ` Brian Masney
2019-04-01 21:39   ` Pavel Machek
2019-04-01 21:39     ` Pavel Machek
2019-04-01 21:39     ` Pavel Machek
2019-04-01 23:04     ` Brian Masney
2019-04-01 23:04       ` Brian Masney
2019-04-02 12:56   ` Dan Murphy
2019-04-02 12:56     ` Dan Murphy
2019-04-02 12:56     ` Dan Murphy
2019-04-02 13:24     ` Brian Masney
2019-04-02 13:24       ` Brian Masney
2019-04-02 13:44       ` Dan Murphy
2019-04-02 13:44         ` Dan Murphy
2019-04-02 13:44         ` Dan Murphy
2019-04-07 11:28         ` Brian Masney
2019-04-07 11:28           ` Brian Masney
2019-04-03  1:50       ` Rob Herring
2019-04-03  1:50         ` Rob Herring
2019-04-03  1:50         ` Rob Herring
2019-04-01 10:30 ` [PATCH v2 3/3] backlight: lm3630a: add device tree supprt Brian Masney
2019-04-01 10:30   ` Brian Masney
2019-04-01 21:48   ` Pavel Machek
2019-04-01 21:48     ` Pavel Machek
2019-04-01 21:48     ` Pavel Machek
2019-04-02  0:02     ` Brian Masney
2019-04-02  0:02       ` Brian Masney
2019-04-02 13:45   ` Dan Murphy
2019-04-02 13:45     ` Dan Murphy
2019-04-02 13:45     ` Dan Murphy
2019-04-02 16:45     ` Pavel Machek
2019-04-02 16:45       ` Pavel Machek
2019-04-02 17:07       ` Dan Murphy
2019-04-02 17:07         ` Dan Murphy
2019-04-02 17:07         ` Dan Murphy

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=20190401213407.GC14681@amd \
    --to=pavel@ucw.cz \
    --cc=b.zolnierkie@samsung.com \
    --cc=daniel.thompson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmurphy@ti.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jacek.anaszewski@gmail.com \
    --cc=jingoohan1@gmail.com \
    --cc=jonathan@marek.ca \
    --cc=lee.jones@linaro.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=masneyb@onstation.org \
    --cc=robh+dt@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.