From: Michael Krufky Date: Thu, 20 Oct 2011 14:42:34 +0000 (+0100) Subject: [media] mxl111sf: disable snr / ber calculations for DVB-T X-Git-Tag: upstream/snapshot3+hdmi~7520^2~896 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7e8d8f6df3e8f26547b3b986c3946b1f8a6bd6c1;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git [media] mxl111sf: disable snr / ber calculations for DVB-T Leaving this code enabled breaks the build on some architectures, and we shouldn't have any floating point math in the kernel, anyway. These macros need to be re-written, but it's harmless to simply return zero for now. Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb/dvb-usb/mxl111sf-demod.c b/drivers/media/dvb/dvb-usb/mxl111sf-demod.c index 330774e..25e75c1 100644 --- a/drivers/media/dvb/dvb-usb/mxl111sf-demod.c +++ b/drivers/media/dvb/dvb-usb/mxl111sf-demod.c @@ -370,10 +370,20 @@ fail: return ret; } +#ifdef MXL111SF_DEMOD_ENABLE_CALCULATIONS +/* FIXME: leaving this enabled breaks the build on some architectures, + * and we shouldn't have any floating point math in the kernel, anyway. + * + * These macros need to be re-written, but it's harmless to simply + * return zero for now. */ #define CALCULATE_BER(avg_errors, count) \ ((u32)(avg_errors * 4)/(count*64*188*8)) #define CALCULATE_SNR(data) \ ((u32)((10 * (u32)data / 64) - 2.5)) +#else +#define CALCULATE_BER(avg_errors, count) 0 +#define CALCULATE_SNR(data) 0 +#endif static int mxl111sf_demod_read_ber(struct dvb_frontend *fe, u32 *ber) {