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.
Attachment:
signature.asc
Description: Digital signature