[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <edb51336ad361f8dad6d9745e47823da6a94a204.1585929579.git.mirq-linux@rere.qmqm.pl>
Date: Fri, 03 Apr 2020 18:23:31 +0200
From: Michał Mirosław <mirq-linux@...e.qmqm.pl>
To: Andrey Smirnov <andrew.smirnov@...il.com>,
Guenter Roeck <linux@...ck-us.net>,
Sebastian Reichel <sebastian.reichel@...labora.com>
Cc: linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org
Subject: [PATCH v2 2/8] power: supply: core: allow to constify property lists
Since tables pointed to by power_supply_desc->properties and
->usb_types are not expected to change after registration, mark
the pointers accordingly
Signed-off-by: Michał Mirosław <mirq-linux@...e.qmqm.pl>
---
include/linux/power_supply.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
index dcd5a71e6c67..6a34df65d4d1 100644
--- a/include/linux/power_supply.h
+++ b/include/linux/power_supply.h
@@ -223,9 +223,9 @@ struct power_supply_config {
struct power_supply_desc {
const char *name;
enum power_supply_type type;
- enum power_supply_usb_type *usb_types;
+ const enum power_supply_usb_type *usb_types;
size_t num_usb_types;
- enum power_supply_property *properties;
+ const enum power_supply_property *properties;
size_t num_properties;
/*
--
2.20.1
Powered by blists - more mailing lists