Messages in this thread |  | | Date | Sat, 22 Feb 2014 12:27:00 +0900 | From | Mark Brown <> | 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. [unhandled content-type:application/pgp-signature] |  |