power: supply: core: allow to constify property lists
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>
Fri, 3 Apr 2020 20:20:32 +0000 (22:20 +0200)
committerSebastian Reichel <sre@kernel.org>
Fri, 1 May 2020 13:43:04 +0000 (15:43 +0200)
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@rere.qmqm.pl>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
include/linux/power_supply.h

index dcd5a71e6c6777b1662b6e38110c3e9d502c35b5..6a34df65d4d18844f6b0055ae18c12b1d1d295f3 100644 (file)
@@ -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;
 
        /*