linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging;iio: if(__LITTLE_ENDIAN) -> #ifdef __LITTLE_ENDIAN
       [not found] <4E8AC89C.7010409@cam.ac.uk>
@ 2011-10-04 15:02 ` Jonathan Cameron
  0 siblings, 0 replies; only message in thread
From: Jonathan Cameron @ 2011-10-04 15:02 UTC (permalink / raw)
  To: greg, sfr; +Cc: linux-iio, linux-kernel, Jonathan Cameron

Unsuprisingly this symbol isn't defined on big endian systems.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
---

Sorry about this one.  Stupid mistake and I didn't have a cross compiler
for anything big endian set up.  Now I do. This time build tested on
arm, x86-64 and 32bit powerpc.

 drivers/staging/iio/industrialio-buffer.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/iio/industrialio-buffer.c b/drivers/staging/iio/industrialio-buffer.c
index 4ce101a..60929ff 100644
--- a/drivers/staging/iio/industrialio-buffer.c
+++ b/drivers/staging/iio/industrialio-buffer.c
@@ -104,10 +104,11 @@ static ssize_t iio_show_fixed_type(struct device *dev,
 	u8 type = this_attr->c->scan_type.endianness;
 
 	if (type == IIO_CPU) {
-		if (__LITTLE_ENDIAN)
-			type = IIO_LE;
-		else
-			type = IIO_BE;
+#ifdef __LITTLE_ENDIAN
+		type = IIO_LE;
+#else
+		type = IIO_BE;
+#endif
 	}
 	return sprintf(buf, "%s:%c%d/%d>>%u\n",
 		       iio_endian_prefix[type],
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-10-04 15:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <4E8AC89C.7010409@cam.ac.uk>
2011-10-04 15:02 ` [PATCH] staging;iio: if(__LITTLE_ENDIAN) -> #ifdef __LITTLE_ENDIAN Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).