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-spi.c | |
parent | fa4c9c93e93f429bb8a8b01c53d54d6bd53a3028 (diff) | |
download | lwn-486294f184c05cff116160bb731cbb679f047621.tar.gz lwn-486294f184c05cff116160bb731cbb679f047621.zip |
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-spi.c')
-rw-r--r-- | drivers/iio/accel/bmc150-accel-spi.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/iio/accel/bmc150-accel-spi.c b/drivers/iio/accel/bmc150-accel-spi.c index 16b66f2a7204..006794a70a1f 100644 --- a/drivers/iio/accel/bmc150-accel-spi.c +++ b/drivers/iio/accel/bmc150-accel-spi.c @@ -25,18 +25,12 @@ #include "bmc150-accel.h" -static const struct regmap_config bmc150_spi_regmap_conf = { - .reg_bits = 8, - .val_bits = 8, - .max_register = 0x3f, -}; - static int bmc150_accel_probe(struct spi_device *spi) { struct regmap *regmap; const struct spi_device_id *id = spi_get_device_id(spi); - regmap = devm_regmap_init_spi(spi, &bmc150_spi_regmap_conf); + regmap = devm_regmap_init_spi(spi, &bmc150_regmap_conf); if (IS_ERR(regmap)) { dev_err(&spi->dev, "Failed to initialize spi regmap\n"); return PTR_ERR(regmap); |