lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 11 Nov 2015 19:38:13 +0100
From:	Martin Kepplinger <martink@...teo.de>
To:	jic23@...nel.org, knaack.h@....de, lars@...afoo.de,
	pmeerw@...erw.net, christoph.muellner@...obroma-systems.com,
	mfuzzey@...keon.com
Cc:	linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
	Martin Kepplinger <martink@...teo.de>,
	Martin Kepplinger <martin.kepplinger@...obroma-systems.com>
Subject: [PATCH 2/3] iio: mma8452: use enum for numbering the axis

Use the newly added enum that numbers x, y and z axis.

Signed-off-by: Martin Kepplinger <martin.kepplinger@...obroma-systems.com>
Signed-off-by: Christoph Muellner <christoph.muellner@...obroma-systems.com>
---
 drivers/iio/accel/mma8452.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c
index dedcc1d..38652e1 100644
--- a/drivers/iio/accel/mma8452.c
+++ b/drivers/iio/accel/mma8452.c
@@ -912,30 +912,30 @@ static struct attribute_group mma8452_event_attribute_group = {
 }
 
 static const struct iio_chan_spec mma8452_channels[] = {
-	MMA8452_CHANNEL(X, 0, 12),
-	MMA8452_CHANNEL(Y, 1, 12),
-	MMA8452_CHANNEL(Z, 2, 12),
+	MMA8452_CHANNEL(X, axis_x, 12),
+	MMA8452_CHANNEL(Y, axis_y, 12),
+	MMA8452_CHANNEL(Z, axis_z, 12),
 	IIO_CHAN_SOFT_TIMESTAMP(3),
 };
 
 static const struct iio_chan_spec mma8453_channels[] = {
-	MMA8452_CHANNEL(X, 0, 10),
-	MMA8452_CHANNEL(Y, 1, 10),
-	MMA8452_CHANNEL(Z, 2, 10),
+	MMA8452_CHANNEL(X, axis_x, 10),
+	MMA8452_CHANNEL(Y, axis_y, 10),
+	MMA8452_CHANNEL(Z, axis_z, 10),
 	IIO_CHAN_SOFT_TIMESTAMP(3),
 };
 
 static const struct iio_chan_spec mma8652_channels[] = {
-	MMA8652_CHANNEL(X, 0, 12),
-	MMA8652_CHANNEL(Y, 1, 12),
-	MMA8652_CHANNEL(Z, 2, 12),
+	MMA8652_CHANNEL(X, axis_x, 12),
+	MMA8652_CHANNEL(Y, axis_y, 12),
+	MMA8652_CHANNEL(Z, axis_z, 12),
 	IIO_CHAN_SOFT_TIMESTAMP(3),
 };
 
 static const struct iio_chan_spec mma8653_channels[] = {
-	MMA8652_CHANNEL(X, 0, 10),
-	MMA8652_CHANNEL(Y, 1, 10),
-	MMA8652_CHANNEL(Z, 2, 10),
+	MMA8652_CHANNEL(X, axis_x, 10),
+	MMA8652_CHANNEL(Y, axis_y, 10),
+	MMA8652_CHANNEL(Z, axis_z, 10),
 	IIO_CHAN_SOFT_TIMESTAMP(3),
 };
 
-- 
2.1.4

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ