aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-01-18 15:34:55 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2009-04-03 14:53:27 -0700
commita44522b20d24c1c2f6496106be17bc1fb6448d42 (patch)
treeb34d753e1725a4b45d3fdda889db8321153bb93b /drivers
parent3f4577bff8b8d03e56f1b62bedca5cd3b18f919a (diff)
Staging: meilhaus: unsigned won't get negative after subtraction
Since unsigned, it won't get negative after subtraction. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/meilhaus/me6000_ao.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/staging/meilhaus/me6000_ao.c b/drivers/staging/meilhaus/me6000_ao.c
index e1c94cb7167..dcb3526d591 100644
--- a/drivers/staging/meilhaus/me6000_ao.c
+++ b/drivers/staging/meilhaus/me6000_ao.c
@@ -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 >