aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@cam.ac.uk>2011-10-04 16:02:08 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-10-04 10:37:06 -0700
commit9d5d11539afba275ff2fec16a180e14b66cb4f1b (patch)
tree0d022bdf3e78862151a1792f36df980c6f38b439
parentstaging: r8712u: include module.h where needed (diff)
staging: iio: if(__LITTLE_ENDIAN) -> #ifdef __LITTLE_ENDIAN
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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/iio/industrialio-buffer.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/staging/iio/industrialio-buffer.c b/drivers/staging/iio/industrialio-buffer.c
index 4ce101af9a95..60929ff633e5 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],