Re: [RESEND PATCH v2] power_supply: power_supply_read_temp only if use_cnt > 0

2016-06-07 Thread Rhyland Klein
On 6/7/2016 3:23 AM, Krzysztof Kozlowski wrote: > On 06/06/2016 06:56 PM, Rhyland Klein wrote: >> Add check to power_supply_read_temp() to only use the power_supply >> get_property() callback if the use_cnt is > 0. The use_cnt will >> be incremented at the end of __power_supply_register, so this wi

Re: [RESEND PATCH v2] power_supply: power_supply_read_temp only if use_cnt > 0

2016-06-07 Thread Krzysztof Kozlowski
On 06/06/2016 06:56 PM, Rhyland Klein wrote: > Add check to power_supply_read_temp() to only use the power_supply > get_property() callback if the use_cnt is > 0. The use_cnt will > be incremented at the end of __power_supply_register, so this will > block to case where get_property can be called b

[RESEND PATCH v2] power_supply: power_supply_read_temp only if use_cnt > 0

2016-06-06 Thread Rhyland Klein
Add check to power_supply_read_temp() to only use the power_supply get_property() callback if the use_cnt is > 0. The use_cnt will be incremented at the end of __power_supply_register, so this will block to case where get_property can be called before the supply is fully registered. This fixes the