Commit 9d5d1153 authored by Jonathan Cameron's avatar Jonathan Cameron Committed by Greg Kroah-Hartman

staging: iio: if(__LITTLE_ENDIAN) -> #ifdef __LITTLE_ENDIAN

Unsuprisingly this symbol isn't defined on big endian systems.
Signed-off-by: default avatarJonathan Cameron <jic23@cam.ac.uk>
Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 81e07c06
...@@ -104,10 +104,11 @@ static ssize_t iio_show_fixed_type(struct device *dev, ...@@ -104,10 +104,11 @@ static ssize_t iio_show_fixed_type(struct device *dev,
u8 type = this_attr->c->scan_type.endianness; u8 type = this_attr->c->scan_type.endianness;
if (type == IIO_CPU) { if (type == IIO_CPU) {
if (__LITTLE_ENDIAN) #ifdef __LITTLE_ENDIAN
type = IIO_LE; type = IIO_LE;
else #else
type = IIO_BE; type = IIO_BE;
#endif
} }
return sprintf(buf, "%s:%c%d/%d>>%u\n", return sprintf(buf, "%s:%c%d/%d>>%u\n",
iio_endian_prefix[type], iio_endian_prefix[type],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment