public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Nishanth Menon <nm@ti.com>
To: Jarkko Nikula <jhnikula@gmail.com>
Cc: linux-omap@vger.kernel.org, Thara Gopinath <thara@ti.com>
Subject: Re: [RFC 1/3] omap3+: sr: Prevent multiple smartreflex class driver enable calls
Date: Wed, 02 Mar 2011 22:22:36 +0530	[thread overview]
Message-ID: <4D6E75D4.6090505@ti.com> (raw)
In-Reply-To: <1299081445-27938-2-git-send-email-jhnikula@gmail.com>

Jarkko Nikula wrote, on 03/02/2011 09:27 PM:
> Currently it is possible to enable multiple times the smartreflex class
> driver from userspace via ../smartreflex/autocomp debugfs entry. Fix this
> by checking the autocomp_active state in sr_start_vddautocomp.
>
> Signed-off-by: Jarkko Nikula<jhnikula@gmail.com>
> ---
> Not known to cause any problems at the moment with class3 driver.
> ---
>   arch/arm/mach-omap2/smartreflex.c |    3 +++
>   1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
> index 95ac336..d94894a 100644
> --- a/arch/arm/mach-omap2/smartreflex.c
> +++ b/arch/arm/mach-omap2/smartreflex.c
> @@ -213,6 +213,9 @@ static void sr_set_regfields(struct omap_sr *sr)
>
>   static void sr_start_vddautocomp(struct omap_sr *sr)
>   {
> +	if (sr->autocomp_active)
> +		return;
> +
>   	if (!sr_class || !(sr_class->enable) || !(sr_class->configure)) {
>   		dev_warn(&sr->pdev->dev,
>   			"%s: smartreflex class driver not registered\n",
is'nt:
http://marc.info/?l=linux-omap&m=129906344711663&w=2
better since the issue with userspace access -> debugfs?

-- 
Regards,
Nishanth Menon

  reply	other threads:[~2011-03-02 16:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-02 15:57 [RFC 0/3] omap3+: sr: Minor fix and cleanups Jarkko Nikula
2011-03-02 15:57 ` [RFC 1/3] omap3+: sr: Prevent multiple smartreflex class driver enable calls Jarkko Nikula
2011-03-02 16:52   ` Nishanth Menon [this message]
2011-03-02 15:57 ` [RFC 2/3] omap3+: sr: Sync sr_stop_vddautocomp implementation with sr_start_vddautocomp Jarkko Nikula
2011-03-02 15:57 ` [RFC 3/3] omap3+: sr: Reuse sr_[start|stop]_vddautocomp functions Jarkko Nikula
2011-03-02 16:59   ` Nishanth Menon
2011-03-03  0:48     ` Kevin Hilman
2011-03-03  0:52       ` Nishanth Menon
2011-03-03  6:57         ` Jarkko Nikula

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=4D6E75D4.6090505@ti.com \
    --to=nm@ti.com \
    --cc=jhnikula@gmail.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=thara@ti.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