Skip to content
Commit 56fb37ef authored by Rikard Falkeborn's avatar Rikard Falkeborn Committed by Greg Kroah-Hartman
Browse files

staging: fieldbus: arcx-anybus: constify static structs



Constify two static structs which are never modified, to allow the
compiler to put them in read-only memory.

The only usage of controller_attribute_group is to put its address in an
array of pointers to const struct attribute_group, and the only usage of
can_power_ops is to assign its address to the 'ops' field in the
regulator_desc struct, which is a pointer to const struct regulator_ops.

Reviewed-by: default avatarSven Van Asbroeck <TheSven73@gmail.com>
Signed-off-by: default avatarRikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20210207202501.9494-1-rikard.falkeborn@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent eac859b8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment