lkml.org 
[lkml]   [2012]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv2] power_supply: Register battery as a thermal zone
On Sun, Jun 17, 2012 at 09:29:28PM -0700, Anton Vorontsov wrote:
[...]
> +static int psy_register_thermal(struct power_supply *psy)
> +{
> + int i;
> +
> + /* Register battery zone device psy reports temperature */
> + for (i = 0; i < psy->num_properties; i++) {
> + if (psy->properties[i] == POWER_SUPPLY_PROP_TEMP) {
> + psy->tzd = thermal_zone_device_register(psy->name, 0,

Oh, and just FYI, there was a (char *) cast for psy->name, but
I removed it. The cast should be not needed w/ this patch:

http://lkml.org/lkml/2012/6/18/28

Thanks,

--
Anton Vorontsov
Email: cbouatmailru@gmail.com


\
 
 \ /
  Last update: 2012-06-18 09:02    [W:0.064 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site