Skip to content

Commit cab767d

Browse files
pmeerwjic23
authored andcommitted
iio:bma180: Prefix remaining tables and functions with bma18_
and minor cleanups Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Cc: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
1 parent 16ed869 commit cab767d

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎drivers/iio/accel/bma180.c‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
#define BMA180_SMP_SKIP BIT(0)
5050

5151
/* Bit masks for registers bit fields */
52-
#define BMA180_RANGE 0x0e /* Range of measured accel values*/
52+
#define BMA180_RANGE 0x0e /* Range of measured accel values */
5353
#define BMA180_BW 0xf0 /* Accel bandwidth */
5454
#define BMA180_MODE_CONFIG 0x03 /* Config operation modes */
5555

@@ -93,8 +93,8 @@ enum bma180_axis {
9393
AXIS_Z,
9494
};
9595

96-
static int bw_table[] = { 10, 20, 40, 75, 150, 300 }; /* Hz */
97-
static int scale_table[] = { 1275, 1863, 2452, 3727, 4903, 9709, 19417 };
96+
static int bma180_bw_table[] = { 10, 20, 40, 75, 150, 300 }; /* Hz */
97+
static int bma180_scale_table[] = { 1275, 1863, 2452, 3727, 4903, 9709, 19417 };
9898

9999
static int bma180_get_acc_reg(struct bma180_data *data, enum bma180_axis axis)
100100
{
@@ -107,7 +107,7 @@ static int bma180_get_acc_reg(struct bma180_data *data, enum bma180_axis axis)
107107
ret = i2c_smbus_read_word_data(data->client, reg);
108108
if (ret < 0)
109109
dev_err(&data->client->dev,
110-
"failed to read accel_%c registers\n", 'x' + axis);
110+
"failed to read accel_%c register\n", 'x' + axis);
111111

112112
return ret;
113113
}
@@ -185,8 +185,8 @@ static int bma180_set_bw(struct bma180_data *data, int val)
185185
if (data->sleep_state)
186186
return -EBUSY;
187187

188-
for (i = 0; i < ARRAY_SIZE(bw_table); ++i) {
189-
if (bw_table[i] == val) {
188+
for (i = 0; i < ARRAY_SIZE(bma180_bw_table); ++i) {
189+
if (bma180_bw_table[i] == val) {
190190
ret = bma180_set_bits(data,
191191
BMA180_BW_TCS, BMA180_BW, i);
192192
if (ret) {
@@ -209,8 +209,8 @@ static int bma180_set_scale(struct bma180_data *data, int val)
209209
if (data->sleep_state)
210210
return -EBUSY;
211211

212-
for (i = 0; i < ARRAY_SIZE(scale_table); ++i)
213-
if (scale_table[i] == val) {
212+
for (i = 0; i < ARRAY_SIZE(bma180_scale_table); ++i)
213+
if (bma180_scale_table[i] == val) {
214214
ret = bma180_set_bits(data,
215215
BMA180_OFFSET_LSB1, BMA180_RANGE, i);
216216
if (ret) {

0 commit comments

Comments
 (0)