aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power/power_supply_core.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-06-30 05:03:36 -0400
committerDavid S. Miller <davem@davemloft.net>2016-06-30 05:03:36 -0400
commitee58b57100ca953da7320c285315a95db2f7053d (patch)
tree77b815a31240adc4d6326346908137fc6c2c3a96 /drivers/power/power_supply_core.c
parent6f30e8b022c8e3a722928ddb1a2ae0be852fcc0e (diff)
parente7bdea7750eb2a64aea4a08fa5c0a31719c8155d (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Several cases of overlapping changes, except the packet scheduler conflicts which deal with the addition of the free list parameter to qdisc_enqueue(). Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/power/power_supply_core.c')
-rw-r--r--drivers/power/power_supply_core.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/drivers/power/power_supply_core.c b/drivers/power/power_supply_core.c
index 456987c88baa..b13cd074c52a 100644
--- a/drivers/power/power_supply_core.c
+++ b/drivers/power/power_supply_core.c
@@ -565,11 +565,12 @@ static int power_supply_read_temp(struct thermal_zone_device *tzd,
565 565
566 WARN_ON(tzd == NULL); 566 WARN_ON(tzd == NULL);
567 psy = tzd->devdata; 567 psy = tzd->devdata;
568 ret = psy->desc->get_property(psy, POWER_SUPPLY_PROP_TEMP, &val); 568 ret = power_supply_get_property(psy, POWER_SUPPLY_PROP_TEMP, &val);
569 if (ret)
570 return ret;
569 571
570 /* Convert tenths of degree Celsius to milli degree Celsius. */ 572 /* Convert tenths of degree Celsius to milli degree Celsius. */
571 if (!ret) 573 *temp = val.intval * 100;
572 *temp = val.intval * 100;
573 574
574 return ret; 575 return ret;
575} 576}
@@ -612,10 +613,12 @@ static int ps_get_max_charge_cntl_limit(struct thermal_cooling_device *tcd,
612 int ret; 613 int ret;
613 614
614 psy = tcd->devdata; 615 psy = tcd->devdata;
615 ret = psy->desc->get_property(psy, 616 ret = power_supply_get_property(psy,
616 POWER_SUPPLY_PROP_CHARGE_CONTROL_LIMIT_MAX, &val); 617 POWER_SUPPLY_PROP_CHARGE_CONTROL_LIMIT_MAX, &val);
617 if (!ret) 618 if (ret)
618 *state = val.intval; 619 return ret;
620
621 *state = val.intval;
619 622
620 return ret; 623 return ret;
621} 624}
@@ -628,10 +631,12 @@ static int ps_get_cur_chrage_cntl_limit(struct thermal_cooling_device *tcd,
628 int ret; 631 int ret;
629 632
630 psy = tcd->devdata; 633 psy = tcd->devdata;
631 ret = psy->desc->get_property(psy, 634 ret = power_supply_get_property(psy,
632 POWER_SUPPLY_PROP_CHARGE_CONTROL_LIMIT, &val); 635 POWER_SUPPLY_PROP_CHARGE_CONTROL_LIMIT, &val);
633 if (!ret) 636 if (ret)
634 *state = val.intval; 637 return ret;
638
639 *state = val.intval;
635 640
636 return ret; 641 return ret;
637} 642}