iio: st_sensors: miscellaneous cleanup
authorMartin Kelly <martin@martingkelly.com>
Tue, 16 Oct 2018 03:27:09 +0000 (20:27 -0700)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 21 Oct 2018 14:33:36 +0000 (15:33 +0100)
Miscellaneous cleanup to fix minor consistency, grammar, and spelling
issues.

Signed-off-by: Martin Kelly <martin@martingkelly.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/common/st_sensors/st_sensors_core.c
drivers/iio/common/st_sensors/st_sensors_trigger.c
drivers/iio/magnetometer/st_magn_core.c

index 26fbd1bd941352d31cb42e0f240f88f20c12fab5..e50c975250e9109ccdfd3fe08b074f504ead86c5 100644 (file)
@@ -133,7 +133,7 @@ static int st_sensors_match_fs(struct st_sensor_settings *sensor_settings,
 
        for (i = 0; i < ST_SENSORS_FULLSCALE_AVL_MAX; i++) {
                if (sensor_settings->fs.fs_avl[i].num == 0)
-                       goto st_sensors_match_odr_error;
+                       return ret;
 
                if (sensor_settings->fs.fs_avl[i].num == fs) {
                        *index_fs_avl = i;
@@ -142,7 +142,6 @@ static int st_sensors_match_fs(struct st_sensor_settings *sensor_settings,
                }
        }
 
-st_sensors_match_odr_error:
        return ret;
 }
 
index fdcc5a8919587b90033b018c4b69f37f40ba5ca0..224596b0e1892dbfbb62bf82def233c1706c057c 100644 (file)
@@ -104,7 +104,7 @@ static irqreturn_t st_sensors_irq_thread(int irq, void *p)
                return IRQ_HANDLED;
 
        /*
-        * If we are using egde IRQs, new samples arrived while processing
+        * If we are using edge IRQs, new samples arrived while processing
         * the IRQ and those may be missed unless we pick them here, so poll
         * again. If the sensor delivery frequency is very high, this thread
         * turns into a polled loop handler.
@@ -148,7 +148,7 @@ int st_sensors_allocate_trigger(struct iio_dev *indio_dev,
                if (!sdata->sensor_settings->drdy_irq.addr_ihl) {
                        dev_err(&indio_dev->dev,
                                "falling/low specified for IRQ "
-                               "but hardware only support rising/high: "
+                               "but hardware supports only rising/high: "
                                "will request rising/high\n");
                        if (irq_trig == IRQF_TRIGGER_FALLING)
                                irq_trig = IRQF_TRIGGER_RISING;
index 72f6d1335a04d363c030a3167e3032794b05f888..880c11c7f1cb30b7bdddc4e111abccb93d0ac923 100644 (file)
@@ -29,9 +29,9 @@
 #define ST_MAGN_NUMBER_DATA_CHANNELS           3
 
 /* DEFAULT VALUE FOR SENSORS */
-#define ST_MAGN_DEFAULT_OUT_X_H_ADDR           0X03
-#define ST_MAGN_DEFAULT_OUT_Y_H_ADDR           0X07
-#define ST_MAGN_DEFAULT_OUT_Z_H_ADDR           0X05
+#define ST_MAGN_DEFAULT_OUT_X_H_ADDR           0x03
+#define ST_MAGN_DEFAULT_OUT_Y_H_ADDR           0x07
+#define ST_MAGN_DEFAULT_OUT_Z_H_ADDR           0x05
 
 /* FULLSCALE */
 #define ST_MAGN_FS_AVL_1300MG                  1300