From: Krzysztof Kozlowski Date: Thu, 12 Mar 2015 07:44:13 +0000 (+0100) Subject: power_supply: Increment power supply use counter when obtaining references X-Git-Tag: omap-for-v4.1/fixes-rc1~174^2~19 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03e81acce5568c7105dc5bef6984c8b0edfe8d45;p=pandora-kernel.git power_supply: Increment power supply use counter when obtaining references Increment the power_supply.use_cnt usage counter on: - power_supply_get_by_phandle() - power_supply_get_by_name() and decrement it on power_supply_put() call. This helps tracking of valid usage of power supply instance by consumers. The usage counter itself also allows safe calling of power_supply_get_property-like functions even when driver unregisters this power supply. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartlomiej Zolnierkiewicz Signed-off-by: Sebastian Reichel --- Reading git-diff-tree failed