* [patch review 3/4] dsbr100: no need to pass curfreq value to dsbr100_setfreq()
@ 2009-05-28 20:44 Alexey Klimov
0 siblings, 0 replies; only message in thread
From: Alexey Klimov @ 2009-05-28 20:44 UTC (permalink / raw)
To: Linux Media; +Cc: Douglas Schilling Landgraf
Small cleanup of dsbr100_setfreq(). No need to pass radio->curfreq value
to this function.
Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
--
diff -r d7322837a62c linux/drivers/media/radio/dsbr100.c
--- a/linux/drivers/media/radio/dsbr100.c Tue May 19 15:18:56 2009 +0400
+++ b/linux/drivers/media/radio/dsbr100.c Tue May 19 15:59:39 2009 +0400
@@ -258,12 +258,12 @@
}
/* set a frequency, freq is defined by v4l's TUNER_LOW, i.e. 1/16th kHz */
-static int dsbr100_setfreq(struct dsbr100_device *radio, int freq)
+static int dsbr100_setfreq(struct dsbr100_device *radio)
{
int retval;
int request;
+ int freq = (radio->curfreq / 16 * 80) / 1000 + 856;
- freq = (freq / 16 * 80) / 1000 + 856;
mutex_lock(&radio->lock);
retval = usb_control_msg(radio->usbdev,
@@ -431,7 +431,7 @@
radio->curfreq = f->frequency;
mutex_unlock(&radio->lock);
- retval = dsbr100_setfreq(radio, radio->curfreq);
+ retval = dsbr100_setfreq(radio);
if (retval < 0)
dev_warn(&radio->usbdev->dev, "Set frequency failed\n");
return 0;
--
Best regards, Klimov Alexey
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-05-28 20:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-28 20:44 [patch review 3/4] dsbr100: no need to pass curfreq value to dsbr100_setfreq() Alexey Klimov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox