]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
regmap: allow const array for {devm_,}regmap_field_bulk_alloc reg_fields
authorIcenowy Zheng <icenowy@sipeed.com>
Mon, 2 Aug 2021 06:37:41 +0000 (14:37 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 2 Aug 2021 11:21:32 +0000 (12:21 +0100)
commit29c34975c9391d3ad1fd5dd3c92ba0d41afe9549
treea4d160a69cc6ef1b539603a8ad4856be9a0f3d68
parentd63aa09f7c53bdeb83edb4d84c07d759a92223bb
regmap: allow const array for {devm_,}regmap_field_bulk_alloc reg_fields

The reg_fields array fed to {devm_}regmap_field_bulk_alloc is currently
not const, which is not correct on semantics (the functions shouldn't
change reg_field contents) and prevents pre-defined const reg_field
array to be used.

As the implementation of this function doesn't change the content of it,
just add const to its prototype.

Signed-off-by: Icenowy Zheng <icenowy@sipeed.com>
Link: https://lore.kernel.org/r/20210802063741.76301-1-icenowy@sipeed.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regmap.c
include/linux/regmap.h