1. 17 Apr, 2019 4 commits
    • Chen-Yu Tsai's avatar
      power: supply: axp20x_usb_power: Fix typo in VBUS current limit macros · c11f0b8f
      Chen-Yu Tsai authored
      The VBUS current limit value macros have VBUS typed as VBUC, while
      the bitmask macro is named correctly. Fix it.
      
      Fixes: 69fb4dca ("power: Add an axp20x-usb-power driver")
      Signed-off-by: default avatarChen-Yu Tsai <wens@csie.org>
      Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
      c11f0b8f
    • Chen-Yu Tsai's avatar
      dt-bindings: power: supply: axp20x_usb_power: add axp813 compatible · 2e8c9d7b
      Chen-Yu Tsai authored
      This adds the "x-powers,axp813-usb-power-supply" to the list of
      compatibles for AXP20X VBUS power supply driver.
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarChen-Yu Tsai <wens@csie.org>
      Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
      2e8c9d7b
    • Wen Yang's avatar
      power: supply: core: fix leaked of_node refs in power_supply_get_battery_info · 2143bf6d
      Wen Yang authored
      The call to of_parse_phandle returns a node pointer with refcount
      incremented thus it must be explicitly decremented after the last
      usage.
      
      Detected by coccinelle with the following warnings:
      ./drivers/power/supply/power_supply_core.c:601:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 595, but without a corresponding object release within this function.
      ./drivers/power/supply/power_supply_core.c:604:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 595, but without a corresponding object release within this function.
      ./drivers/power/supply/power_supply_core.c:632:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 595, but without a corresponding object release within this function.
      ./drivers/power/supply/power_supply_core.c:635:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 595, but without a corresponding object release within this function.
      ./drivers/power/supply/power_supply_core.c:653:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 595, but without a corresponding object release within this function.
      ./drivers/power/supply/power_supply_core.c:664:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 595, but without a corresponding object release within this function.
      ./drivers/power/supply/power_supply_core.c:673:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 595, but without a corresponding object release within this function.
      Signed-off-by: default avatarWen Yang <wen.yang99@zte.com.cn>
      Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
      2143bf6d
    • Wen Yang's avatar
      power: supply: ab8500: fix leaked of_node refs in ab8500_bm_of_probe · 0b646fd1
      Wen Yang authored
      The call to of_parse_phandle returns a node pointer with refcount
      incremented thus it must be explicitly decremented after the last
      usage.
      
      492 int ab8500_bm_of_probe(struct device *dev,
      493                        struct device_node *np,
      494                        struct abx500_bm_data *bm)
      495 {
      496         const struct batres_vs_temp *tmp_batres_tbl;
      497         struct device_node *battery_node;
          ...
      501         /* get phandle to 'battery-info' node */
      502         battery_node = of_parse_phandle(np, "battery", 0);
          ...
      509         if (!btech) {
      510                 dev_warn(dev, "missing property battery-name/type\n");
      511                 return -EINVAL;    ---> leaked here
      512         }
          ...
      540         of_node_put(battery_node);   ---> released here
      541
      542         return 0;
      543 }
      
      Detected by coccinelle with the following warnings:
      ./drivers/power/supply/ab8500_bmdata.c:511:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 502, but without a corresponding object release within this function.
      Signed-off-by: default avatarWen Yang <wen.yang99@zte.com.cn>
      Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
      0b646fd1
  2. 15 Apr, 2019 10 commits
  3. 09 Apr, 2019 3 commits
  4. 05 Apr, 2019 10 commits
  5. 17 Mar, 2019 13 commits