iio: accel: bmc150: remove unused definition
PATCH 1/1 iio: accel: bmc150: remove unused definition
bmc150_i2c_regmap_conf is defined in bmc150-accel-core.c, but never used here. The definition is needed in bmc150-accel-i2c.c, where it is again defined.
Remove the unnecessary definition of bmc150_i2c_regmap_conf from bmc150-accel-core.c and update the one from bmc150-accel-i2c.c to contain all fields.
--- drivers/iio/accel/bmc150-accel-core.c | 6 ------ drivers/iio/accel/bmc150-accel-i2c.c | 1 + 2 files changed, 1 insertion(+), 6 deletions(-)
drivers/iio/accel/bmc150-accel-core.c +0 -6
@@ -246,12 +246,6 @@ static const struct { {500000, BMC150_ACCEL_SLEEP_500_MS}, {1000000, BMC150_ACCEL_SLEEP_1_SEC} }; -static const struct regmap_config bmc150_i2c_regmap_conf = { - .reg_bits =8 , - .val_bits =8 , - .max_register =0x3f , -}; -static int bmc150_accel_set_mode (struct bmc150_accel_data *data,enum bmc150_power_modes mode,int dur_us)
drivers/iio/accel/bmc150-accel-i2c.c +1 -0
@@ -31,6 +31,7 @@static const struct regmap_config bmc150_i2c_regmap_conf = { .reg_bits =8 , .val_bits =8 , + .max_register =0x3f , }; static int bmc150_accel_probe(struct i2c_client *client,
Signature · 1 line
1.9.1
Jonathan Cameron
maintainerQuoted 9 lines · Irina Tirdea
bmc150_i2c_regmap_confis defined inbmc150-accel-core.c, but never used here. The definition is needed inbmc150-accel-i2c.c, where it is again defined.Remove the unnecessary definition of
bmc150_i2c_regmap_conffrombmc150-accel-core.cand update the one frombmc150-accel-i2c.cto contain all fields.Signed-off-by Irina Tirdea <[email protected]>
Silly question. Why isn't it shared between the i2c and spi drivers? Looks to be the same in both cases (as we'd expect from regmap most of the time!). I think it would be better to share it.
Jonathan
Quoted 35 lines
--- drivers/iio/accel/bmc150-accel-core.c | 6 ------ drivers/iio/accel/bmc150-accel-i2c.c | 1 + 2 files changed, 1 insertion(+), 6 deletions(-)drivers/iio/accel/bmc150-accel-core.c +0
-6@@ -246,12 +246,6 @@ static const struct { {500000, BMC150_ACCEL_SLEEP_500_MS}, {1000000, BMC150_ACCEL_SLEEP_1_SEC} }; -static const struct regmap_config bmc150_i2c_regmap_conf = { - .reg_bits =8 , - .val_bits =8 , - .max_register =0x3f , -}; -static int bmc150_accel_set_mode (struct bmc150_accel_data *data,enum bmc150_power_modes mode,int dur_us)drivers/iio/accel/bmc150-accel-i2c.c +1
-0@@ -31,6 +31,7 @@static const struct regmap_config bmc150_i2c_regmap_conf = { .reg_bits =8 , .val_bits =8 , + .max_register =0x3f , }; static int bmc150_accel_probe(struct i2c_client *client,
Quoted 7 lines
-----Original Message-----
From: Jonathan Cameron [mailto:[email protected]]
Sent: 28 March, 2016 13:09
To: Tirdea, Irina; [email protected]
Cc: [email protected]; Hartmut Knaack; Lars-Peter Clausen; Pet=
er Meerwald; Markus Pargmann
Quoted 7 lines
Subject: Re: [PATCH 1/1] iio: accel: bmc150: remove unused definition =20
Quoted 4 lines · Irina Tirdea
bmc150_i2c_regmap_confis defined inbmc150-accel-core.c, but never used here. The definition is needed inbmc150-accel-i2c.c, where it is again defined.
Quoted 9 lines
Quoted 5 lines
Remove the unnecessary definition of
bmc150_i2c_regmap_conffrombmc150-accel-core.cand update the one frombmc150-accel-i2c.cto contain all fields.Signed-off-by Irina Tirdea <[email protected]>Silly question. Why isn't it shared between the i2c and spi drivers? Looks to be the same in both cases (as we'd expect from regmap most of the time!). I think it would be better to share it.
Good point. I'll keep the definition in the core file and share the regmap with the rest.
Thanks,
Irina