public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: Roger Quadros <ext-roger.quadros@nokia.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH] OMAP3: PM: Do not Enable SmartReflex if OPP tables not defined
Date: Tue, 19 May 2009 09:54:16 -0700	[thread overview]
Message-ID: <87d4a56nk7.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1242736671-27268-1-git-send-email-ext-roger.quadros@nokia.com> (Roger Quadros's message of "Tue\, 19 May 2009 15\:37\:51 +0300")

Roger Quadros <ext-roger.quadros@nokia.com> writes:

> Prevent SmartReflex driver driver from loading if OPP tables are
> not defined by platform. This removes possibility of NULL pointer
> reference in SmartReflex driver code.
>
> Signed-off-by: Roger Quadros <ext-roger.quadros@nokia.com>

Thanks, pushing to PM branch.

Kevin

> ---
>  arch/arm/mach-omap2/smartreflex.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
> index b032366..4823ce8 100644
> --- a/arch/arm/mach-omap2/smartreflex.c
> +++ b/arch/arm/mach-omap2/smartreflex.c
> @@ -852,6 +852,12 @@ static int __init omap3_sr_init(void)
>  	int ret = 0;
>  	u8 RdReg;
>  
> +	/* Exit if OPP tables are not defined */
> +        if (!(mpu_opps && l3_opps)) {
> +                pr_err("SR: OPP rate tables not defined for platform, not enabling SmartReflex\n");
> +		return -ENODEV;
> +        }
> +
>  	/* Enable SR on T2 */
>  	ret = twl4030_i2c_read_u8(TWL4030_MODULE_PM_RECEIVER, &RdReg,
>  					R_DCDC_GLOBAL_CFG);
> -- 
> 1.6.0.4

      reply	other threads:[~2009-05-19 16:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-19 12:37 [PATCH] OMAP3: PM: Do not Enable SmartReflex if OPP tables not defined Roger Quadros
2009-05-19 16:54 ` Kevin Hilman [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=87d4a56nk7.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=ext-roger.quadros@nokia.com \
    --cc=linux-omap@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