-----------------------------------------------------------------------------*/
/* returns a maxdata value for a given n_bits */
-static inline lsampl_t figure_out_maxdata(int bits);
+static inline lsampl_t figure_out_maxdata(int bits)
+{
+ return (((lsampl_t)1 << bits) - 1);
+}
/*
* Probes for a supported device.
}
-/* returns a maxdata value for a given n_bits */
-static inline lsampl_t figure_out_maxdata(int bits)
-{
- lsampl_t max = 0;
- int i;
-
- for (i = 0; i < bits; i++) {
- max <<= 1;
- max |= 1U;
- }
- return max;
-}
-