iio:magnetometer:bmc150_magn: replace magic value
authorHartmut Knaack <knaack.h@gmx.de>
Fri, 17 Jul 2015 08:52:27 +0000 (10:52 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 19 Jul 2015 10:04:15 +0000 (11:04 +0100)
Construct the scanmask using its descriptive axis names (as used in
iio_chan_spec) instead of a 'magic' value.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/magnetometer/bmc150_magn.c

index cd002710dd0273e0f5a8e4a2e907ac73666cf27d..074a99da7367305d2beb09503192a992e462b822 100644 (file)
@@ -651,7 +651,9 @@ static const struct iio_info bmc150_magn_info = {
        .driver_module = THIS_MODULE,
 };
 
-static const unsigned long bmc150_magn_scan_masks[] = {0x07, 0};
+static const unsigned long bmc150_magn_scan_masks[] = {
+                                       BIT(AXIS_X) | BIT(AXIS_Y) | BIT(AXIS_Z),
+                                       0};
 
 static irqreturn_t bmc150_magn_trigger_handler(int irq, void *p)
 {