mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 10:20:17 -04:00
power: supply: core: rename psy_has_property() to psy_desc_has_property()
The function only takes a desc as parameter, align the naming. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20241111-power-supply-extensions-v4-2-7240144daa8e@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
committed by
Sebastian Reichel
parent
31d8440e07
commit
172f2151c2
@@ -1180,8 +1180,8 @@ bool power_supply_battery_bti_in_range(struct power_supply_battery_info *info,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(power_supply_battery_bti_in_range);
|
||||
|
||||
static bool psy_has_property(const struct power_supply_desc *psy_desc,
|
||||
enum power_supply_property psp)
|
||||
static bool psy_desc_has_property(const struct power_supply_desc *psy_desc,
|
||||
enum power_supply_property psp)
|
||||
{
|
||||
bool found = false;
|
||||
int i;
|
||||
@@ -1206,7 +1206,7 @@ int power_supply_get_property(struct power_supply *psy,
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (psy_has_property(psy->desc, psp))
|
||||
if (psy_desc_has_property(psy->desc, psp))
|
||||
return psy->desc->get_property(psy, psp, val);
|
||||
else if (power_supply_battery_info_has_prop(psy->battery_info, psp))
|
||||
return power_supply_battery_info_get_prop(psy->battery_info, psp, val);
|
||||
@@ -1300,7 +1300,7 @@ static int psy_register_thermal(struct power_supply *psy)
|
||||
return 0;
|
||||
|
||||
/* Register battery zone device psy reports temperature */
|
||||
if (psy_has_property(psy->desc, POWER_SUPPLY_PROP_TEMP)) {
|
||||
if (psy_desc_has_property(psy->desc, POWER_SUPPLY_PROP_TEMP)) {
|
||||
/* Prefer our hwmon device and avoid duplicates */
|
||||
struct thermal_zone_params tzp = {
|
||||
.no_hwmon = IS_ENABLED(CONFIG_POWER_SUPPLY_HWMON)
|
||||
|
||||
Reference in New Issue
Block a user