iio: Fix iio_channel_has_info
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>
Mon, 1 Jul 2013 14:20:00 +0000 (15:20 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jul 2013 21:07:23 +0000 (14:07 -0700)
commit8b68eefae0dbd8cdddb54af08c2b424f6da6f6ba
tree39ccc0450a0f993e8673901f89ecf537886ea054
parent88c0a794e5d9bcc29926e636cd1d6eb5c9dcb235
iio: Fix iio_channel_has_info

commit 1c297a66654a3295ae87e2b7f3724d214eb2b5ec upstream.

Since the info_mask split, iio_channel_has_info() is not working correctly.
info_mask_separate and info_mask_shared_by_type, it is not possible to compare
them directly with the iio_chan_info_enum enum. Correct that bit using the BIT()
macro.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/iio/iio.h