linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>,
	Grazvydas Ignotas <notasas@gmail.com>,
	linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org
Subject: Re: [PATCH 1/2] OMAPDSS: TPO-TD03MTEA1: Check for errors from regulator_enable()
Date: Wed, 21 Mar 2012 12:50:00 +0000	[thread overview]
Message-ID: <1332334200.2236.13.camel@deskari> (raw)
In-Reply-To: <1332169352-5076-1-git-send-email-broonie@opensource.wolfsonmicro.com>

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

On Mon, 2012-03-19 at 15:02 +0000, Mark Brown wrote:
> It is possible for regulator_enable() to fail and if it does fail that's
> generally a bad sign for anything we try to do with the hardware afterwards
> so check for and immediately return an error if regulator_enable() fails.
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
>  .../video/omap2/displays/panel-tpo-td043mtea1.c    |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/video/omap2/displays/panel-tpo-td043mtea1.c b/drivers/video/omap2/displays/panel-tpo-td043mtea1.c
> index 32f3fcd..74c6b87 100644
> --- a/drivers/video/omap2/displays/panel-tpo-td043mtea1.c
> +++ b/drivers/video/omap2/displays/panel-tpo-td043mtea1.c
> @@ -272,11 +272,14 @@ static const struct omap_video_timings tpo_td043_timings = {
>  static int tpo_td043_power_on(struct tpo_td043_device *tpo_td043)
>  {
>  	int nreset_gpio = tpo_td043->nreset_gpio;
> +	int r;
>  
>  	if (tpo_td043->powered_on)
>  		return 0;
>  
> -	regulator_enable(tpo_td043->vcc_reg);
> +	r = regulator_enable(tpo_td043->vcc_reg);
> +	if (r != 0)
> +		return r;
>  
>  	/* wait for regulator to stabilize */
>  	msleep(160);

Thanks, I'll apply this series to omapdss tree.

 Tomi


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

      parent reply	other threads:[~2012-03-21 12:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-19 15:02 [PATCH 1/2] OMAPDSS: TPO-TD03MTEA1: Check for errors from regulator_enable() Mark Brown
2012-03-19 15:02 ` [PATCH 2/2] OMAPDSS: TPO-TD03MTEA1: Correct comment for power on delay Mark Brown
2012-03-19 16:06   ` Grazvydas Ignotas
2012-03-19 16:01 ` [PATCH 1/2] OMAPDSS: TPO-TD03MTEA1: Check for errors from regulator_enable() Grazvydas Ignotas
2012-03-21 12:50 ` Tomi Valkeinen [this message]

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=1332334200.2236.13.camel@deskari \
    --to=tomi.valkeinen@ti.com \
    --cc=FlorianSchandinat@gmx.de \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=notasas@gmail.com \
    /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).