[PATCH 2/9] power: supply: Enable struct power_supply_ext to be construct dynamically
From: Armin Wolf
Date: Mon Nov 09 2026 - 19:25:44 EST
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>
---
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