diff options
author | Julia Lawall | 2016-01-05 15:56:42 +0100 |
---|---|---|
committer | Jonathan Cameron | 2016-01-10 12:35:33 +0000 |
commit | f78c5f96547e6eaa894557730af3f66b8116c5c2 (patch) | |
tree | 36b6dc19bf17712b848f2372badf8557d575c316 /drivers | |
parent | a9fd053b56c6bb14972ab7a19da0b575fe4c5d66 (diff) |
iio: ak8975: constify ak_def structures
The ak_def structures are never modified, so declare them as const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/iio/magnetometer/ak8975.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/magnetometer/ak8975.c b/drivers/iio/magnetometer/ak8975.c index b13936dacc78..9c5c9ef3f1da 100644 --- a/drivers/iio/magnetometer/ak8975.c +++ b/drivers/iio/magnetometer/ak8975.c @@ -252,7 +252,7 @@ struct ak_def { u8 data_regs[3]; }; -static struct ak_def ak_def_array[AK_MAX_TYPE] = { +static const struct ak_def ak_def_array[AK_MAX_TYPE] = { { .type = AK8975, .raw_to_gauss = ak8975_raw_to_gauss, @@ -360,7 +360,7 @@ static struct ak_def ak_def_array[AK_MAX_TYPE] = { */ struct ak8975_data { struct i2c_client *client; - struct ak_def *def; + const struct ak_def *def; struct attribute_group attrs; struct mutex lock; u8 asa[3]; |