Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] si2165: Reject DVB-T bandwidth auto mode

The si2165 does not support bandwidth auto-detection.
Reject the request.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

authored by

Matthias Schwarzott and committed by
Mauro Carvalho Chehab
7655a3ae a561d768

+7 -7
+7 -7
drivers/media/dvb-frontends/si2165.c
··· 825 825 struct si2165_state *state = fe->demodulator_priv; 826 826 u32 dvb_rate = 0; 827 827 u16 bw10k; 828 + u32 bw_hz = p->bandwidth_hz; 828 829 829 830 dprintk("%s: called\n", __func__); 830 831 831 832 if (!state->has_dvbt) 832 833 return -EINVAL; 833 834 834 - if (p->bandwidth_hz > 0) { 835 - dvb_rate = p->bandwidth_hz * 8 / 7; 836 - bw10k = p->bandwidth_hz / 10000; 837 - } else { 838 - dvb_rate = 8 * 8 / 7; 839 - bw10k = 800; 840 - } 835 + /* no bandwidth auto-detection */ 836 + if (bw_hz == 0) 837 + return -EINVAL; 838 + 839 + dvb_rate = bw_hz * 8 / 7; 840 + bw10k = bw_hz / 10000; 841 841 842 842 ret = si2165_adjust_pll_divl(state, 12); 843 843 if (ret < 0)