linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] power_supply: Decrement the device reference counter
@ 2014-10-14 12:35 Krzysztof Kozlowski
  2014-10-14 12:35 ` [PATCH 1/7] power_supply: Add power_supply_put for decrementing " Krzysztof Kozlowski
                   ` (7 more replies)
  0 siblings, 8 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2014-10-14 12:35 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, Linus Walleij,
	Samuel Ortiz, Lee Jones, Sebastian Reichel,
	Dmitry Eremin-Solenikov, David Woodhouse, Krzysztof Kozlowski,
	Konrad Rzeszutek Wilk, Rafael J. Wysocki, Lv Zheng, Bjorn Helgaas,
	linux-kernel, linux-arm-kernel, linux-pm
  Cc: Anton Vorontsov, Pavel Machek, Kyungmin Park, Marek Szyprowski,
	Bartlomiej Zolnierkiewicz

Hi,

The reference counter of device allocated for power supply was
incremented with each call to power_supply_get_by_name() and
power_supply_get_by_phandle().

Add a symmetric 'put' operation so the device could be released after
final put_device() call during supply unregistering.


Rebased on next-20141007 + mine [1] patchset.
Tested on Trats2 board (max77693 + charger manager).

Kindly asking for reviewing/testing other drivers.

Best regards,
Krzysztof


[1] power_supply: Add API for safe access of get_property-like function attrs
https://lkml.org/lkml/2014/10/14/155


Krzysztof Kozlowski (7):
  power_supply: Add power_supply_put for decrementing device reference
    counter
  power: charger-manager: Decrement the power supply's device reference
    counter
  x86/olpc/xo1/sci: Use newly added power_supply_put API
  x86/olpc/xo15/sci: Use newly added power_supply_put API
  power: 88pm860x_charger: Decrement the power supply's device reference
    counter
  power: bq2415x_charger: Decrement the power supply's device reference
    counter
  mfd: ab8500: Decrement the power supply's device reference counter

 arch/x86/platform/olpc/olpc-xo1-sci.c  |  4 +-
 arch/x86/platform/olpc/olpc-xo15-sci.c |  4 +-
 drivers/mfd/ab8500-sysctrl.c           |  2 +
 drivers/power/88pm860x_charger.c       | 11 +++++-
 drivers/power/bq2415x_charger.c        |  6 ++-
 drivers/power/charger-manager.c        | 69 ++++++++++++++++++++++------------
 drivers/power/power_supply_core.c      | 41 ++++++++++++++++++++
 include/linux/power_supply.h           |  1 +
 8 files changed, 108 insertions(+), 30 deletions(-)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2014-11-04  7:50 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-14 12:35 [PATCH 0/7] power_supply: Decrement the device reference counter Krzysztof Kozlowski
2014-10-14 12:35 ` [PATCH 1/7] power_supply: Add power_supply_put for decrementing " Krzysztof Kozlowski
2014-10-14 12:35 ` [PATCH 2/7] power: charger-manager: Decrement the power supply's " Krzysztof Kozlowski
2014-10-14 12:35 ` [PATCH 3/7] x86/olpc/xo1/sci: Use newly added power_supply_put API Krzysztof Kozlowski
2014-10-14 12:35 ` [PATCH 4/7] x86/olpc/xo15/sci: " Krzysztof Kozlowski
2014-10-14 12:35 ` [PATCH 5/7] power: 88pm860x_charger: Decrement the power supply's device reference counter Krzysztof Kozlowski
2014-10-14 12:35 ` [PATCH 6/7] power: bq2415x_charger: " Krzysztof Kozlowski
2014-10-14 12:35 ` [PATCH 7/7] mfd: ab8500: " Krzysztof Kozlowski
2014-10-28 10:00   ` Linus Walleij
2014-11-03 17:59   ` Lee Jones
2014-11-03 18:00     ` Lee Jones
2014-11-04  7:50       ` Krzysztof Kozlowski
2014-10-15 12:18 ` [PATCH 0/7] power_supply: Decrement the " Pavel Machek
2014-10-15 12:52   ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).