aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb/mxl111sf-demod.c
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@kernellabs.com>2011-10-20 10:42:34 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-11-03 05:42:43 -0400
commit7e8d8f6df3e8f26547b3b986c3946b1f8a6bd6c1 (patch)
treedf4e0591f0f8fcb760636c3fefc116ba5afd0e50 /drivers/media/dvb/dvb-usb/mxl111sf-demod.c
parent4f98480f32fb11af40de3947cc5d500ec9691726 (diff)
[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 <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/mxl111sf-demod.c')
-rw-r--r--drivers/media/dvb/dvb-usb/mxl111sf-demod.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/dvb/dvb-usb/mxl111sf-demod.c b/drivers/media/dvb/dvb-usb/mxl111sf-demod.c
index 330774e346ab..25e75c1ae36e 100644
--- a/drivers/media/dvb/dvb-usb/mxl111sf-demod.c
+++ b/drivers/media/dvb/dvb-usb/mxl111sf-demod.c
@@ -370,10 +370,20 @@ fail:
370 return ret; 370 return ret;
371} 371}
372 372
373#ifdef MXL111SF_DEMOD_ENABLE_CALCULATIONS
374/* FIXME: leaving this enabled breaks the build on some architectures,
375 * and we shouldn't have any floating point math in the kernel, anyway.
376 *
377 * These macros need to be re-written, but it's harmless to simply
378 * return zero for now. */
373#define CALCULATE_BER(avg_errors, count) \ 379#define CALCULATE_BER(avg_errors, count) \
374 ((u32)(avg_errors * 4)/(count*64*188*8)) 380 ((u32)(avg_errors * 4)/(count*64*188*8))
375#define CALCULATE_SNR(data) \ 381#define CALCULATE_SNR(data) \
376 ((u32)((10 * (u32)data / 64) - 2.5)) 382 ((u32)((10 * (u32)data / 64) - 2.5))
383#else
384#define CALCULATE_BER(avg_errors, count) 0
385#define CALCULATE_SNR(data) 0
386#endif
377 387
378static int mxl111sf_demod_read_ber(struct dvb_frontend *fe, u32 *ber) 388static int mxl111sf_demod_read_ber(struct dvb_frontend *fe, u32 *ber)
379{ 389{