diff options
author | Irina Tirdea <irina.tirdea@intel.com> | 2016-03-29 15:21:21 +0300 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-04-03 11:24:52 +0100 |
commit | 486294f184c05cff116160bb731cbb679f047621 (patch) | |
tree | d726bd32492c72e7afd96e53ad90182ec1547c7d /drivers/iio/accel/bmc150-accel-i2c.c | |
parent | fa4c9c93e93f429bb8a8b01c53d54d6bd53a3028 (diff) |
iio: accel: bmc150: use common definition for regmap conf
bmc150_i2c_regmap_conf is defined three times (in bmc150-accel-core.c,
bmc150-accel-i2c.c and and bmc150-accel-spi.c), although the
definition is the same.
Use one common definition for bmc150_i2c_regmap_conf in all
included files.
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/accel/bmc150-accel-i2c.c')
-rw-r--r-- | drivers/iio/accel/bmc150-accel-i2c.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/iio/accel/bmc150-accel-i2c.c b/drivers/iio/accel/bmc150-accel-i2c.c index b41404ba32fc..8ca8041267ef 100644 --- a/drivers/iio/accel/bmc150-accel-i2c.c +++ b/drivers/iio/accel/bmc150-accel-i2c.c @@ -28,11 +28,6 @@ #include "bmc150-accel.h" -static const struct regmap_config bmc150_i2c_regmap_conf = { - .reg_bits = 8, - .val_bits = 8, -}; - static int bmc150_accel_probe(struct i2c_client *client, const struct i2c_device_id *id) { @@ -43,7 +38,7 @@ static int bmc150_accel_probe(struct i2c_client *client, i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_READ_I2C_BLOCK); - regmap = devm_regmap_init_i2c(client, &bmc150_i2c_regmap_conf); + regmap = devm_regmap_init_i2c(client, &bmc150_regmap_conf); if (IS_ERR(regmap)) { dev_err(&client->dev, "Failed to initialize i2c regmap\n"); return PTR_ERR(regmap); |