aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/magnetometer
diff options
context:
space:
mode:
authorRikard Falkeborn <rikard.falkeborn@gmail.com>2020-05-26 23:02:23 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-06-14 11:49:38 +0100
commitc2c878097b06a481335e322bbb01e2da43e58881 (patch)
treeef5408ea891024ddc8f61b08f8f5ac9e38d0f9bf /drivers/iio/magnetometer
parentiio: light: stk3310: Constify regmap_config (diff)
downloadlinux-dev-c2c878097b06a481335e322bbb01e2da43e58881.tar.xz
linux-dev-c2c878097b06a481335e322bbb01e2da43e58881.zip
iio: magnetometer: mmc35240: Constify struct reg_default
mmc35240_reg_defaults is not modified and can be made const to allow the compiler to put it in read-only memory. Before: text data bss dec hex filename 9759 3288 128 13175 3377 drivers/iio/magnetometer/mmc35240.o After: text data bss dec hex filename 9823 3224 128 13175 3377 drivers/iio/magnetometer/mmc35240.o Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/magnetometer')
-rw-r--r--drivers/iio/magnetometer/mmc35240.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/magnetometer/mmc35240.c b/drivers/iio/magnetometer/mmc35240.c
index 1787d656d009..f27586716b5c 100644
--- a/drivers/iio/magnetometer/mmc35240.c
+++ b/drivers/iio/magnetometer/mmc35240.c
@@ -459,7 +459,7 @@ static bool mmc35240_is_volatile_reg(struct device *dev, unsigned int reg)
}
}
-static struct reg_default mmc35240_reg_defaults[] = {
+static const struct reg_default mmc35240_reg_defaults[] = {
{ MMC35240_REG_CTRL0, 0x00 },
{ MMC35240_REG_CTRL1, 0x00 },
};