[PATCH 1/2] kmx61: Use uscale instead of scale

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This makes it easier to notice that we only use
the micro part for scale.

Signed-off-by: Daniel Baluta <daniel.baluta@xxxxxxxxx>
---
 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-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux