diff mbox series

power: supply: core: constify psy_tzd_ops

Message ID 20240828-power-supply-const-psy_tzd_ops-v1-1-dc27176fda5b@weissschuh.net (mailing list archive)
State Handled Elsewhere, archived
Headers show
Series power: supply: core: constify psy_tzd_ops | expand

Commit Message

Thomas Weißschuh Aug. 28, 2024, 6:04 p.m. UTC
This struct is never modified, so mark it const.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
 drivers/power/supply/power_supply_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


---
base-commit: 86987d84b968b69a610fd00ab9006c13db193b4e
change-id: 20240828-power-supply-const-psy_tzd_ops-d2f4c96518f9

Best regards,

Comments

Sebastian Reichel Aug. 28, 2024, 10:17 p.m. UTC | #1
On Wed, 28 Aug 2024 20:04:29 +0200, Thomas Weißschuh wrote:
> This struct is never modified, so mark it const.
> 
> 

Applied, thanks!

[1/1] power: supply: core: constify psy_tzd_ops
      commit: 9dad0127ad732f756d056ea152e0b084f321c765

Best regards,
diff mbox series

Patch

diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/supply/power_supply_core.c
index 8f6025acd10a..ecd011cb455b 100644
--- a/drivers/power/supply/power_supply_core.c
+++ b/drivers/power/supply/power_supply_core.c
@@ -1296,7 +1296,7 @@  static int power_supply_read_temp(struct thermal_zone_device *tzd,
 	return ret;
 }
 
-static struct thermal_zone_device_ops psy_tzd_ops = {
+static const struct thermal_zone_device_ops psy_tzd_ops = {
 	.get_temp = power_supply_read_temp,
 };