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

2016-06-09 Thread Sebastian Reichel
Hi, On Thu, Jun 09, 2016 at 11:31:37AM -0400, Rhyland Klein wrote: > On 6/9/2016 6:05 AM, Krzysztof Kozlowski wrote: > > On 06/08/2016 05:26 PM, Rhyland Klein wrote: > >> On 6/8/2016 2:35 AM, Krzysztof Kozlowski wrote: > >>> On 06/07/2016 10:26 PM, Rhyland Klein wrote: > Change

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

2016-06-09 Thread Sebastian Reichel
Hi, On Thu, Jun 09, 2016 at 11:31:37AM -0400, Rhyland Klein wrote: > On 6/9/2016 6:05 AM, Krzysztof Kozlowski wrote: > > On 06/08/2016 05:26 PM, Rhyland Klein wrote: > >> On 6/8/2016 2:35 AM, Krzysztof Kozlowski wrote: > >>> On 06/07/2016 10:26 PM, Rhyland Klein wrote: > Change

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

2016-06-09 Thread Rhyland Klein
On 6/9/2016 6:05 AM, Krzysztof Kozlowski wrote: > On 06/08/2016 05:26 PM, Rhyland Klein wrote: >> On 6/8/2016 2:35 AM, Krzysztof Kozlowski wrote: >>> On 06/07/2016 10:26 PM, Rhyland Klein wrote: Change power_supply_read_temp() to use power_supply_get_property() so that it will check the

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

2016-06-09 Thread Rhyland Klein
On 6/9/2016 6:05 AM, Krzysztof Kozlowski wrote: > On 06/08/2016 05:26 PM, Rhyland Klein wrote: >> On 6/8/2016 2:35 AM, Krzysztof Kozlowski wrote: >>> On 06/07/2016 10:26 PM, Rhyland Klein wrote: Change power_supply_read_temp() to use power_supply_get_property() so that it will check the

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

2016-06-09 Thread Krzysztof Kozlowski
On 06/08/2016 05:26 PM, Rhyland Klein wrote: > On 6/8/2016 2:35 AM, Krzysztof Kozlowski wrote: >> On 06/07/2016 10:26 PM, Rhyland Klein wrote: >>> Change power_supply_read_temp() to use power_supply_get_property() >>> so that it will check the use_cnt and ensure it is > 0. The use_cnt >>> will be

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

2016-06-09 Thread Krzysztof Kozlowski
On 06/08/2016 05:26 PM, Rhyland Klein wrote: > On 6/8/2016 2:35 AM, Krzysztof Kozlowski wrote: >> On 06/07/2016 10:26 PM, Rhyland Klein wrote: >>> Change power_supply_read_temp() to use power_supply_get_property() >>> so that it will check the use_cnt and ensure it is > 0. The use_cnt >>> will be

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

2016-06-08 Thread Rhyland Klein
On 6/8/2016 2:35 AM, Krzysztof Kozlowski wrote: > On 06/07/2016 10:26 PM, Rhyland Klein wrote: >> Change power_supply_read_temp() to use power_supply_get_property() >> so that it will check the use_cnt and ensure it is > 0. The use_cnt >> will be incremented at the end of __power_supply_register,

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

2016-06-08 Thread Rhyland Klein
On 6/8/2016 2:35 AM, Krzysztof Kozlowski wrote: > On 06/07/2016 10:26 PM, Rhyland Klein wrote: >> Change power_supply_read_temp() to use power_supply_get_property() >> so that it will check the use_cnt and ensure it is > 0. The use_cnt >> will be incremented at the end of __power_supply_register,

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

2016-06-08 Thread Krzysztof Kozlowski
On 06/07/2016 10:26 PM, Rhyland Klein wrote: > Change power_supply_read_temp() to use power_supply_get_property() > so that it will check the use_cnt and ensure it 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

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

2016-06-08 Thread Krzysztof Kozlowski
On 06/07/2016 10:26 PM, Rhyland Klein wrote: > Change power_supply_read_temp() to use power_supply_get_property() > so that it will check the use_cnt and ensure it 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

[PATCH v3] power_supply: power_supply_read_temp only if use_cnt > 0

2016-06-07 Thread Rhyland Klein
Change power_supply_read_temp() to use power_supply_get_property() so that it will check the use_cnt and ensure it 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

[PATCH v3] power_supply: power_supply_read_temp only if use_cnt > 0

2016-06-07 Thread Rhyland Klein
Change power_supply_read_temp() to use power_supply_get_property() so that it will check the use_cnt and ensure it 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