Skip to content

Commit

Permalink
staging: iio: if(__LITTLE_ENDIAN) -> #ifdef __LITTLE_ENDIAN
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Oct 4, 2011
1 parent 81e07c0 commit 9d5d115
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions drivers/staging/iio/industrialio-buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit 9d5d115

Please sign in to comment.