diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2015-12-23 22:59:55 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-01-02 00:29:35 +0100 |
commit | 600c395bf6c4e44ec831e850d7f93ce53d7373be (patch) | |
tree | 5fd394811a50f7edbcab38c06dde00c507475477 /drivers/powercap/powercap_sys.c | |
parent | Linux 4.4-rc7 (diff) | |
download | linux-600c395bf6c4e44ec831e850d7f93ce53d7373be.tar.xz linux-600c395bf6c4e44ec831e850d7f93ce53d7373be.zip |
powercap: constify powercap_zone_ops and powercap_zone_constraint_ops structures
The powercap_zone_ops and powercap_zone_constraint_ops structures are never
modified, so declare them as const.
Most of the actual changes adjust indentation to accomodate the const
keyword.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/powercap/powercap_sys.c')
-rw-r--r-- | drivers/powercap/powercap_sys.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/powercap/powercap_sys.c b/drivers/powercap/powercap_sys.c index 84419af16f77..14bde0db8c24 100644 --- a/drivers/powercap/powercap_sys.c +++ b/drivers/powercap/powercap_sys.c @@ -293,8 +293,8 @@ err_alloc: } static int create_constraints(struct powercap_zone *power_zone, - int nr_constraints, - struct powercap_zone_constraint_ops *const_ops) + int nr_constraints, + const struct powercap_zone_constraint_ops *const_ops) { int i; int ret = 0; @@ -492,13 +492,13 @@ static struct class powercap_class = { }; struct powercap_zone *powercap_register_zone( - struct powercap_zone *power_zone, - struct powercap_control_type *control_type, - const char *name, - struct powercap_zone *parent, - const struct powercap_zone_ops *ops, - int nr_constraints, - struct powercap_zone_constraint_ops *const_ops) + struct powercap_zone *power_zone, + struct powercap_control_type *control_type, + const char *name, + struct powercap_zone *parent, + const struct powercap_zone_ops *ops, + int nr_constraints, + const struct powercap_zone_constraint_ops *const_ops) { int result; int nr_attrs; |