diff options
Diffstat (limited to 'include/linux/iio')
-rw-r--r-- | include/linux/iio/iio.h | 4 | ||||
-rw-r--r-- | include/linux/iio/trigger.h | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h index 8d171f42763..3d35b702359 100644 --- a/include/linux/iio/iio.h +++ b/include/linux/iio/iio.h @@ -211,8 +211,8 @@ struct iio_chan_spec { static inline bool iio_channel_has_info(const struct iio_chan_spec *chan, enum iio_chan_info_enum type) { - return (chan->info_mask_separate & type) | - (chan->info_mask_shared_by_type & type); + return (chan->info_mask_separate & BIT(type)) | + (chan->info_mask_shared_by_type & BIT(type)); } #define IIO_ST(si, rb, sb, sh) \ diff --git a/include/linux/iio/trigger.h b/include/linux/iio/trigger.h index 3869c525b05..369cf2cd514 100644 --- a/include/linux/iio/trigger.h +++ b/include/linux/iio/trigger.h @@ -8,6 +8,7 @@ */ #include <linux/irq.h> #include <linux/module.h> +#include <linux/atomic.h> #ifndef _IIO_TRIGGER_H_ #define _IIO_TRIGGER_H_ @@ -61,7 +62,7 @@ struct iio_trigger { struct list_head list; struct list_head alloc_list; - int use_count; + atomic_t use_count; struct irq_chip subirq_chip; int subirq_base; |