[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140222032700.GX25940@sirena.org.uk>
Date: Sat, 22 Feb 2014 12:27:00 +0900
From: Mark Brown <broonie@...nel.org>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Takashi Yoshii <takasi-y@....dti.ne.jp>,
Magnus Damm <magnus.damm@...il.com>, linux-spi@...r.kernel.org,
linux-sh@...r.kernel.org, linux-kernel@...r.kernel.org,
Geert Uytterhoeven <geert+renesas@...ux-m68k.org>
Subject: Re: [PATCH 08/10] spi: sh-msiof: Move clock management to
(un)prepare_message()
On Thu, Feb 20, 2014 at 03:43:07PM +0100, Geert Uytterhoeven wrote:
> + if (!test_and_set_bit(0, &p->flags)) {
> + pm_runtime_get_sync(&p->pdev->dev);
> + clk_enable(p->clk);
> + }
That test_and_set_bit() is a bit odd - what's going on there, perhaps a
comment is in order? I'd also like to see return value checks, though
the original didn't have them so it's not a blocker, and ideally that
should be clk_prepare_enable(). I guess the clock stuff could even be
moved inside the runtime PM callbacks? Again not a blocker if the
existing code doesn't have things but it'd be nice to do.
There's also auto_runtime_pm in the SPI core which will do the runtime
PM for you if you can do it unconditionally.
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists