summaryrefslogtreecommitdiff
path: root/drivers/iio/magnetometer
diff options
context:
space:
mode:
authorHartmut Knaack <knaack.h@gmx.de>2015-07-17 11:52:27 +0300
committerJonathan Cameron <jic23@kernel.org>2015-07-19 13:04:15 +0300
commit47764c7918f5dd648ae8f6f61db1aaab1b9c09dd (patch)
tree5db202cf6c0e19315af8c6f7ddb73ebbee62b05a /drivers/iio/magnetometer
parent2563f7fc83d655792ec9999e2dda7a37172ae6aa (diff)
downloadlinux-47764c7918f5dd648ae8f6f61db1aaab1b9c09dd.tar.xz
iio:magnetometer:bmc150_magn: replace magic value
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>
Diffstat (limited to 'drivers/iio/magnetometer')
-rw-r--r--drivers/iio/magnetometer/bmc150_magn.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/iio/magnetometer/bmc150_magn.c b/drivers/iio/magnetometer/bmc150_magn.c
index cd002710dd02..074a99da7367 100644
--- a/drivers/iio/magnetometer/bmc150_magn.c
+++ b/drivers/iio/magnetometer/bmc150_magn.c
@@ -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)
{