commit | d6f015b6ad035d465d0ab30e9a441e5e8d18d4b7 | [log] [tgz] |
---|---|---|
author | Ian Abbott <abbotti@mev.co.uk> | Fri Sep 14 17:34:23 2012 +0100 |
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | Mon Sep 17 05:09:07 2012 -0700 |
tree | 32e1fc2bd5e5a378d5f30e3312750ac8bba2f195 | |
parent | 7d24e1ac00173a5a271bf1353d4216836dab55e6 [diff] |
staging: comedi: mite: use ilog2() The static inline functions `MITE_IODWBSR_1_WSIZE_bits()` and `CR_RL()` in "mite.h" work out a base-2 logarithm using a `while` loop. Change them to use `ilog2()`. Also change `CR_RL()` to clamp the maximum value instead of printing an error. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>