[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1416230316-14511-2-git-send-email-daniel.baluta@intel.com>
Date: Mon, 17 Nov 2014 15:18:35 +0200
From: Daniel Baluta <daniel.baluta@...el.com>
To: jic23@...nel.org
Cc: linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 1/2] kmx61: Use uscale instead of scale
This makes it easier to notice that we only use
the micro part for scale.
Signed-off-by: Daniel Baluta <daniel.baluta@...el.com>
---
drivers/iio/imu/kmx61.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/iio/imu/kmx61.c b/drivers/iio/imu/kmx61.c
index 2bd77dd..e49b1cc 100644
--- a/drivers/iio/imu/kmx61.c
+++ b/drivers/iio/imu/kmx61.c
@@ -90,7 +90,7 @@ enum kmx61_scan {
};
static const struct {
- u16 scale;
+ u16 uscale;
u8 gsel0;
u8 gsel1;
} kmx61_scale_table[] = {
@@ -337,13 +337,13 @@ static int kmx61_set_range(struct kmx61_data *data, int range)
return 0;
}
-static int kmx61_set_scale(struct kmx61_data *data, int val)
+static int kmx61_set_scale(struct kmx61_data *data, int uscale)
{
int ret, i;
u8 mode;
for (i = 0; i < ARRAY_SIZE(kmx61_scale_table); i++) {
- if (kmx61_scale_table[i].scale == val) {
+ if (kmx61_scale_table[i].uscale == uscale) {
ret = kmx61_get_mode(data, &mode,
KMX61_ACC | KMX61_MAG);
if (ret < 0)
@@ -441,7 +441,7 @@ static int kmx61_read_raw(struct iio_dev *indio_dev,
switch (chan->type) {
case IIO_ACCEL:
*val = 0;
- *val2 = kmx61_scale_table[data->range].scale;
+ *val2 = kmx61_scale_table[data->range].uscale;
return IIO_VAL_INT_PLUS_MICRO;
case IIO_MAGN:
/* 14 bits res, 1465 microGauss per magn count */
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists