b/drivers/media/dvb/frontends/stb0899_algo.c
@@ -23,6 +23,13 @@
#include "stb0899_priv.h"
#include "stb0899_reg.h"
+#include <linux/kernel.h>
+#include <linux/module.h>
+
+static int derot_max = 8192;
+module_param(derot_max, int, 0644);
+MODULE_PARM_DESC(derot_max, "Set Maximum Derot Value (0..32767)");
+
static inline u32 stb0899_do_div(u64 n, u32 d)
{
/* wrap do_div() for ease of use */
@@ -117,7 +124,7 @@ static u32 stb0899_set_srate(struct stb0899_state *state,
u32 master_clk, u32 sr
*/
static long stb0899_calc_derot_time(long srate)
{
- if (srate > 0)
+ if (srate > 999)
return (100000 / (srate / 1000));
else