]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/staging/meilhaus/me6000_ao.c
Staging: meilhaus: unsigned won't get negative after subtraction
[linux-2.6-omap-h63xx.git] / drivers / staging / meilhaus / me6000_ao.c
index e1c94cb71677114663cf168012538360a248f3bc..dcb3526d591cfaf23f74cd21d2e7214d3eb5de3e 100644 (file)
@@ -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 >