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>
This commit is contained in:
Jonathan Cameron 2011-10-04 16:02:08 +01:00 committed by Greg Kroah-Hartman
parent 81e07c06e6
commit 9d5d11539a
1 changed files with 5 additions and 4 deletions

View 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],