[RESEND PATCH v6 15/22] power_supply: Increment power supply use counter when obtaining references

2015-03-12 Thread Krzysztof Kozlowski
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

[PATCH v6 15/22] power_supply: Increment power supply use counter when obtaining references

2015-03-10 Thread Krzysztof Kozlowski
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