summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorDouglas Schilling Landgraf <dougsland@redhat.com>2009-06-11 00:19:49 -0300
committerDouglas Schilling Landgraf <dougsland@redhat.com>2009-06-11 00:19:49 -0300
commit6bea6dd6ddb19d2e3257cc14e4df56daaee39aa0 (patch)
tree0720466bf1e0c0a300aee2d32015ad440c919689 /linux/drivers/media
parent6bf2b298d078666cdb61e3360d5f478f2c0e6524 (diff)
downloadmediapointer-dvb-s2-6bea6dd6ddb19d2e3257cc14e4df56daaee39aa0.tar.gz
mediapointer-dvb-s2-6bea6dd6ddb19d2e3257cc14e4df56daaee39aa0.tar.bz2
dsbr100: no need to pass curfreq value to dsbr100_setfreq()
From: Alexey Klimov <klimov.linux@gmail.com> Small cleanup of dsbr100_setfreq(). No need to pass radio->curfreq value to this function. Priority: normal Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/radio/dsbr100.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/linux/drivers/media/radio/dsbr100.c b/linux/drivers/media/radio/dsbr100.c
index e9bb4f9c1..9b4f1d2ea 100644
--- a/linux/drivers/media/radio/dsbr100.c
+++ b/linux/drivers/media/radio/dsbr100.c
@@ -258,12 +258,12 @@ usb_control_msg_failed:
}
/* 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 @@ static int vidioc_s_frequency(struct file *file, void *priv,
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;