From e9e9d3973594cadd9e892bc79f914f299bb61124 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Sat, 16 Aug 2014 21:23:40 +0800 Subject: mfd: da9052: Avoid setting read_flag_mask for da9052-i2c driver Current code init regmap with &da9052_regmap_config for both da9052-spi and da9052-i2c drivers. da9052-spi sets the read_flag_mask. The same setting may be applied for da9052-i2c if da9052-spi driver is loaded first because they actually use the same regmap_config setting. Fix this issue by using a local variable for regmap_config in da9052-spi driver, so the settings in spi driver won't impact the settings in i2c driver. Also makes da9052_regmap_config const to avoid similar issue. Signed-off-by: Axel Lin Acked-by: Adam Thomson Signed-off-by: Lee Jones --- drivers/mfd/da9052-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/mfd/da9052-core.c') diff --git a/drivers/mfd/da9052-core.c b/drivers/mfd/da9052-core.c index e8af816d73a9..52a0c2f6264f 100644 --- a/drivers/mfd/da9052-core.c +++ b/drivers/mfd/da9052-core.c @@ -522,7 +522,7 @@ static const struct mfd_cell da9052_subdev_info[] = { }, }; -struct regmap_config da9052_regmap_config = { +const struct regmap_config da9052_regmap_config = { .reg_bits = 8, .val_bits = 8, -- cgit v1.2.3