[PATCH] power: supply: core: constify psy_tzd_ops

Thomas Weißschuh posted 1 patch 1 year, 3 months ago
drivers/power/supply/power_supply_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] power: supply: core: constify psy_tzd_ops
Posted by Thomas Weißschuh 1 year, 3 months ago
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(-)

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,
 };
 

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

Best regards,
-- 
Thomas Weißschuh <linux@weissschuh.net>

Re: [PATCH] power: supply: core: constify psy_tzd_ops
Posted by Sebastian Reichel 1 year, 3 months ago
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,
-- 
Sebastian Reichel <sebastian.reichel@collabora.com>