Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f78c5f96 authored by Julia Lawall's avatar Julia Lawall Committed by Jonathan Cameron
Browse files

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: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent a9fd053b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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];