Re: [PATCH v2 2/9] power: supply: Enable struct power_supply_ext to be construct dynamically

From: Sebastian Reichel

Date: Mon Nov 30 2026 - 13:11:43 EST


Hi,

On Tue, Nov 10, 2026 at 05:50:03PM +0100, Armin Wolf wrote:
> Providers of power supply extensions currently cannot construct them
> dynamically because the pointer to the name string is declared as
> being const, even when the remaining members of
> struct power_supply_ext are not declared as being const.
>
> Remove this pointless restriction to allow providers to dynamically
> construct power supply extensions.
>
> Signed-off-by: Armin Wolf <W_Armin@xxxxxx>
> ---

Reviewed-by: Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxx>

Greetings,

-- Sebastian

> include/linux/power_supply.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
> index 73bcb127d0fc..a0cabc139298 100644
> --- a/include/linux/power_supply.h
> +++ b/include/linux/power_supply.h
> @@ -318,7 +318,7 @@ struct power_supply_desc {
> };
>
> struct power_supply_ext {
> - const char *const name;
> + const char *name;
> u8 charge_behaviours;
> u32 charge_types;
> const enum power_supply_property *properties;
> --
> 2.56.0
>
>

Attachment: signature.asc
Description: PGP signature