public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	linux-arm-kernel@lists.infradead.org, linux-sh@vger.kernel.org,
	Mike Turquette <mturquette@linaro.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 02/12] clocksource: sh_mtu2: Add clk_prepare/unprepare support
Date: Tue, 29 Oct 2013 14:24:57 +0100	[thread overview]
Message-ID: <12808622.W4bQC68mNI@avalon> (raw)
In-Reply-To: <526F98BD.9000904@cogentembedded.com>

Hi Sergei,

On Tuesday 29 October 2013 15:15:09 Sergei Shtylyov wrote:
> On 29-10-2013 2:49, Laurent Pinchart wrote:
> > Prepare the clock at probe time, as there is no other appropriate place
> > in the driver where we're allowed to sleep.
> > 
> > Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> > Cc: linux-kernel@vger.kernel.org
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
> > ---
> > 
> >   drivers/clocksource/sh_mtu2.c | 16 ++++++++++++++--
> >   1 file changed, 14 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
> > index 4aac9ee..3cf1283 100644
> > --- a/drivers/clocksource/sh_mtu2.c
> > +++ b/drivers/clocksource/sh_mtu2.c
> > @@ -313,8 +313,20 @@ static int sh_mtu2_setup(struct sh_mtu2_priv *p,
> > struct platform_device *pdev)> 
> >   		goto err1;
> >   	}
> > 
> > -	return sh_mtu2_register(p, (char *)dev_name(&p->pdev->dev),
> > -				cfg->clockevent_rating);
> > +	ret = clk_prepare(p->clk);
> > +	if (ret < 0)
> > +		goto err2;
> > +
> > +	ret = sh_mtu2_register(p, (char *)dev_name(&p->pdev->dev),
> > +			       cfg->clockevent_rating);
> > +	if (ret < 0)
> > +		goto err3;
> > +
> > +	return 0;
> > + err3:
> > +	clk_unprepare(p->clk);
> > + err2:
> > +	clk_put(p->clk);
> 
>     This one seems to be a fix and so needs to be in a separate patch...

I'll split the patch and repost (same for 03/12)

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2013-10-29 13:24 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-28 22:49 [PATCH 00/12] Prepare various SH/R Mobile/Car drivers for CCF migration Laurent Pinchart
2013-10-28 22:49 ` [PATCH 01/12] clocksource: sh_cmt: Add clk_prepare/unprepare support Laurent Pinchart
2013-10-29  5:55   ` Simon Horman
2013-10-29  9:55     ` Laurent Pinchart
2013-10-30  0:10       ` Simon Horman
2013-10-30  0:13         ` Laurent Pinchart
2013-10-30  0:27           ` Simon Horman
2013-10-28 22:49 ` [PATCH 02/12] clocksource: sh_mtu2: " Laurent Pinchart
2013-10-29  5:55   ` Simon Horman
2013-10-29 11:15   ` Sergei Shtylyov
2013-10-29 13:24     ` Laurent Pinchart [this message]
2013-10-29 14:30   ` [PATCH v2 1/2] clocksource: sh_mtu2: Release clock when sh_mtu2_register() fails Laurent Pinchart
2013-10-29 14:30     ` [PATCH v2 2/2] clocksource: sh_mtu2: Add clk_prepare/unprepare support Laurent Pinchart
2013-10-31  5:23       ` Simon Horman
2013-11-08 10:10       ` Daniel Lezcano
2013-10-31  5:23     ` [PATCH v2 1/2] clocksource: sh_mtu2: Release clock when sh_mtu2_register() fails Simon Horman
2013-11-08 10:10     ` Daniel Lezcano
2013-10-28 22:49 ` [PATCH 03/12] clocksource: sh_tmu: Add clk_prepare/unprepare support Laurent Pinchart
2013-10-29  5:55   ` Simon Horman
2013-10-29 11:17   ` Sergei Shtylyov
2013-10-29 14:31   ` [PATCH v2 1/2] clocksource: sh_tmu: Release clock when sh_tmu_register() fails Laurent Pinchart
2013-10-29 14:31     ` [PATCH v2 2/2] clocksource: sh_tmu: Add clk_prepare/unprepare support Laurent Pinchart
2013-10-31  5:24       ` Simon Horman
2013-11-07 13:40         ` Daniel Lezcano
2013-11-08  5:22           ` Simon Horman
2013-11-08 10:10       ` Daniel Lezcano
2013-10-31  5:23     ` [PATCH v2 1/2] clocksource: sh_tmu: Release clock when sh_tmu_register() fails Simon Horman
2013-11-08 10:10     ` Daniel Lezcano

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=12808622.W4bQC68mNI@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=sergei.shtylyov@cogentembedded.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