Skip to content

Commit

Permalink
Staging: meilhaus: unsigned won't get negative after subtraction
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roel Kluin authored and Greg Kroah-Hartman committed Apr 3, 2009
1 parent 3f4577b commit a44522b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions drivers/staging/meilhaus/me6000_ao.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 >
Expand Down

0 comments on commit a44522b

Please sign in to comment.