Skip to contentSkip to conversation

video/tuner: fix tuner->freq updating

PATCH New Jiri Benc 1 participant 1 message May 6, 2005 Media (V4L/DVB)

lore
Share & tools
lore

Jiri Benc

author
#0 lore raw

PATCH 1/2 video/tuner: fix tuner->freq updating

In VIDIOC_S_FREQUENCY command in tuner-core.c, t->freq is set to a new value before calling set_freq(). This is not necessary, as set_freq() sets t->freq itself. Moreover, it causes problems with Philips tuners, as they need to take into consideration difference between previous and new frequency.

drivers/media/video/tuner-core.c +1 -2
@@ -357,8 +357,7 @@
 		    V4L2_TUNER_RADIO != t->mode)
 			set_tv_freq(client,400*16);
 		t->mode  = f->type;
-		t->freq  = f->frequency;
-		set_freq(client,t->freq);
+		set_freq(client,f->frequency);
 		break;
 	}
 	case VIDIOC_G_TUNER:

--
Jiri Benc
SUSE Labs