From: Jonathan Cameron Date: Tue, 4 Oct 2011 15:02:08 +0000 (+0100) Subject: staging: iio: if(__LITTLE_ENDIAN) -> #ifdef __LITTLE_ENDIAN X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9d5d11539afba275ff2fec16a180e14b66cb4f1b;p=linux-beck.git 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 --- 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],