mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
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:
parent
81e07c06e6
commit
9d5d11539a
1 changed files with 5 additions and 4 deletions
|
@ -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],
|
||||
|
|
Loading…
Reference in a new issue