]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
regulator: enable/disable refcounting
authorDavid Brownell <dbrownell@users.sourceforge.net>
Sun, 16 Nov 2008 19:44:46 +0000 (11:44 -0800)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Thu, 8 Jan 2009 20:10:29 +0000 (20:10 +0000)
commit412aec610559bdb602a0a21ce149ba8ffbb6f983
treeddc1e45080b94fdd791c244ab6f9cada712a52e5
parent812460a927c1d0dc1fbdbec9aa07de1b04043d83
regulator: enable/disable refcounting

Make the <linux/regulator.h> framework treat enable/disable call
pairs like the <linux/clk.h> and <linux/interrupt.h> frameworks do:
they're refcounted, so that different parts of a driver don't need
to put work into coordination that frameworks normally handle.
It's a minor object code shrink.

It also makes the regulator_is_disabled() kerneldoc say what it's
actually returning:  return value is not a refcount, and may report
an error (e.g. I/O error from I2C).

It also fixes some minor regulator_put() goofage:  removing unlocked
access to the enable state.  (But still not making regulator put/get
match the refcounting pattern they invoke.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
drivers/regulator/core.c