staging: iio: if(__LITTLE_ENDIAN) -> #ifdef __LITTLE_ENDIAN
authorJonathan Cameron <jic23@cam.ac.uk>
Tue, 4 Oct 2011 15:02:08 +0000 (16:02 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 4 Oct 2011 17:37:06 +0000 (10:37 -0700)
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>
drivers/staging/iio/industrialio-buffer.c

index 4ce101a..60929ff 100644 (file)
@@ -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],