diff options
Diffstat (limited to 'drivers/staging/meilhaus/me6000_ao.c')
-rw-r--r-- | drivers/staging/meilhaus/me6000_ao.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/staging/meilhaus/me6000_ao.c b/drivers/staging/meilhaus/me6000_ao.c index 94f01231f79a..dcb3526d591c 100644 --- a/drivers/staging/meilhaus/me6000_ao.c +++ b/drivers/staging/meilhaus/me6000_ao.c @@ -1063,7 +1063,7 @@ static int me6000_ao_io_stream_config(me_subdevice_t * subdevice, } if (flags & ME_IO_STREAM_CONFIG_HARDWARE_ONLY) { - if (!flags & ME_IO_STREAM_CONFIG_WRAPAROUND) { + if (!(flags & ME_IO_STREAM_CONFIG_WRAPAROUND)) { PERROR ("Hardware ME_IO_STREAM_CONFIG_HARDWARE_ONLY has to be with ME_IO_STREAM_CONFIG_WRAPAROUND.\n"); return ME_ERRNO_INVALID_FLAGS; @@ -2825,10 +2825,11 @@ int inline ao_stop_immediately(me6000_ao_subdevice_t * instance) int i; uint32_t single_mask; - single_mask = - (instance->ao_idx - ME6000_AO_SINGLE_STATUS_OFFSET < - 0) ? 0x0000 : (0x0001 << (instance->ao_idx - - ME6000_AO_SINGLE_STATUS_OFFSET)); + if (instance->ao_idx < ME6000_AO_SINGLE_STATUS_OFFSET) + single_mask = 0x0000; + else + single_mask = 0x0001 << (instance->ao_idx - + ME6000_AO_SINGLE_STATUS_OFFSET); timeout = (instance->hardware_stop_delay > |