Message ID | 20240904-power-supply-extensions-v3-1-62efeb93f8ec@weissschuh.net (mailing list archive) |
---|---|
State | Handled Elsewhere, archived |
Headers | show |
Series | power: supply: extension API | expand |
Hi, On 9/4/24 9:25 PM, Thomas Weißschuh wrote: > The function only takes a desc as parameter, align the naming. > > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Thanks, patch looks good to me: Reviewed-by: Hans de Goede <hdegoede@redhat.com> Regards, Hans > --- > drivers/power/supply/power_supply_core.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/supply/power_supply_core.c > index 8f6025acd10a..cff68c4fd63c 100644 > --- a/drivers/power/supply/power_supply_core.c > +++ b/drivers/power/supply/power_supply_core.c > @@ -1183,8 +1183,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; > @@ -1209,7 +1209,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); > @@ -1308,7 +1308,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) > @@ -1361,7 +1361,7 @@ __power_supply_register(struct device *parent, > pr_warn("%s: Expected proper parent device for '%s'\n", > __func__, desc->name); > > - if (psy_has_property(desc, POWER_SUPPLY_PROP_USB_TYPE) && > + if (psy_desc_has_property(desc, POWER_SUPPLY_PROP_USB_TYPE) && > (!desc->usb_types || !desc->num_usb_types)) > return ERR_PTR(-EINVAL); > >
Hi, On Wed, Sep 04, 2024 at 09:25:34PM GMT, Thomas Weißschuh wrote: > The function only takes a desc as parameter, align the naming. > > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> > --- too late for 6.12, so Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> -- Sebastian > drivers/power/supply/power_supply_core.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/supply/power_supply_core.c > index 8f6025acd10a..cff68c4fd63c 100644 > --- a/drivers/power/supply/power_supply_core.c > +++ b/drivers/power/supply/power_supply_core.c > @@ -1183,8 +1183,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; > @@ -1209,7 +1209,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); > @@ -1308,7 +1308,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) > @@ -1361,7 +1361,7 @@ __power_supply_register(struct device *parent, > pr_warn("%s: Expected proper parent device for '%s'\n", > __func__, desc->name); > > - if (psy_has_property(desc, POWER_SUPPLY_PROP_USB_TYPE) && > + if (psy_desc_has_property(desc, POWER_SUPPLY_PROP_USB_TYPE) && > (!desc->usb_types || !desc->num_usb_types)) > return ERR_PTR(-EINVAL); > > > -- > 2.46.0 >
diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/supply/power_supply_core.c index 8f6025acd10a..cff68c4fd63c 100644 --- a/drivers/power/supply/power_supply_core.c +++ b/drivers/power/supply/power_supply_core.c @@ -1183,8 +1183,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; @@ -1209,7 +1209,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); @@ -1308,7 +1308,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) @@ -1361,7 +1361,7 @@ __power_supply_register(struct device *parent, pr_warn("%s: Expected proper parent device for '%s'\n", __func__, desc->name); - if (psy_has_property(desc, POWER_SUPPLY_PROP_USB_TYPE) && + if (psy_desc_has_property(desc, POWER_SUPPLY_PROP_USB_TYPE) && (!desc->usb_types || !desc->num_usb_types)) return ERR_PTR(-EINVAL);
The function only takes a desc as parameter, align the naming. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> --- drivers/power/supply/power_supply_core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)