From 9d5d11539afba275ff2fec16a180e14b66cb4f1b Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Tue, 4 Oct 2011 16:02:08 +0100 Subject: [PATCH] staging: iio: if(__LITTLE_ENDIAN) -> #ifdef __LITTLE_ENDIAN Unsuprisingly this symbol isn't defined on big endian systems. Signed-off-by: Jonathan Cameron Reported-by: Stephen Rothwell Signed-off-by: Greg Kroah-Hartman --- drivers/staging/iio/industrialio-buffer.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/staging/iio/industrialio-buffer.c b/drivers/staging/iio/industrialio-buffer.c index 4ce101af9a9..60929ff633e 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], -- 2.46.0