From: Hans Verkuil Date: Tue, 14 Jun 2011 06:56:09 +0000 (-0300) Subject: [media] tuner-core: fix s_std and s_tuner X-Git-Tag: v3.0-rc7~2^2~13 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e4a31fb95d88518180517bae3098a23ebde9f9c;p=pandora-kernel.git [media] tuner-core: fix s_std and s_tuner Both s_std and s_tuner are broken because set_mode_freq is called before the new std (for s_std) and audmode (for s_tuner) are set. This patch splits set_mode_freq in a set_mode and a set_freq and in s_std/s_tuner first calls set_mode, and if that returns 0 (i.e. the mode is supported) then they set t->std/t->audmode and call set_freq. This fixes a bug where changing std or audmode would actually change it to the previous value. Discovered while testing analog TV standards for cx18 with a tda18271 tuner. Cc: stable@kernel.org Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed