From: Frank Mori Hess Date: Fri, 14 Jan 2005 01:19:43 +0000 (+0000) Subject: fix for gcc3.4 compile error from Ian Abbott X-Git-Tag: r0_7_70~65 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=19f4fa19d9453847d3d108b0c5272a00c63758ab;p=comedi.git fix for gcc3.4 compile error from Ian Abbott --- diff --git a/comedi/drivers/cb_pcimdda.c b/comedi/drivers/cb_pcimdda.c index 54a7dc52..faf09c57 100644 --- a/comedi/drivers/cb_pcimdda.c +++ b/comedi/drivers/cb_pcimdda.c @@ -209,7 +209,10 @@ static int ao_rinsn(comedi_device *dev, comedi_subdevice *s, -----------------------------------------------------------------------------*/ /* 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. @@ -486,18 +489,5 @@ static int probe(comedi_device *dev, const comedi_devconfig *it) } -/* 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; -} -