diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-05-02 11:04:13 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-16 17:21:01 -0400 |
commit | 1d80db562f9ee6d6d72cdbf488493e4cd6433669 (patch) | |
tree | dc0e55db4eeec5394c5ba2cad9f57121d0722720 /drivers/media/radio/radio-sf16fmr2.c | |
parent | 9d6f7f603f8c362eec321e8dacb1cb54d74fa004 (diff) |
V4L/DVB (11676): radio-fm16: cleanups
Remove bogus flags field
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/radio/radio-sf16fmr2.c')
-rw-r--r-- | drivers/media/radio/radio-sf16fmr2.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/media/radio/radio-sf16fmr2.c b/drivers/media/radio/radio-sf16fmr2.c index 935ff9bcdfcc..87e01c556d88 100644 --- a/drivers/media/radio/radio-sf16fmr2.c +++ b/drivers/media/radio/radio-sf16fmr2.c | |||
@@ -61,13 +61,12 @@ struct fmr2 | |||
61 | int stereo; /* card is producing stereo audio */ | 61 | int stereo; /* card is producing stereo audio */ |
62 | unsigned long curfreq; /* freq in kHz */ | 62 | unsigned long curfreq; /* freq in kHz */ |
63 | int card_type; | 63 | int card_type; |
64 | u32 flags; | ||
65 | }; | 64 | }; |
66 | 65 | ||
67 | static struct fmr2 fmr2_card; | 66 | static struct fmr2 fmr2_card; |
68 | 67 | ||
69 | /* hw precision is 12.5 kHz | 68 | /* hw precision is 12.5 kHz |
70 | * It is only useful to give freq in intervall of 200 (=0.0125Mhz), | 69 | * It is only useful to give freq in interval of 200 (=0.0125Mhz), |
71 | * other bits will be truncated | 70 | * other bits will be truncated |
72 | */ | 71 | */ |
73 | #define RSF16_ENCODE(x) ((x) / 200 + 856) | 72 | #define RSF16_ENCODE(x) ((x) / 200 + 856) |
@@ -221,7 +220,6 @@ static int vidioc_querycap(struct file *file, void *priv, | |||
221 | static int vidioc_g_tuner(struct file *file, void *priv, | 220 | static int vidioc_g_tuner(struct file *file, void *priv, |
222 | struct v4l2_tuner *v) | 221 | struct v4l2_tuner *v) |
223 | { | 222 | { |
224 | int mult; | ||
225 | struct fmr2 *fmr2 = video_drvdata(file); | 223 | struct fmr2 *fmr2 = video_drvdata(file); |
226 | 224 | ||
227 | if (v->index > 0) | 225 | if (v->index > 0) |
@@ -230,11 +228,10 @@ static int vidioc_g_tuner(struct file *file, void *priv, | |||
230 | strlcpy(v->name, "FM", sizeof(v->name)); | 228 | strlcpy(v->name, "FM", sizeof(v->name)); |
231 | v->type = V4L2_TUNER_RADIO; | 229 | v->type = V4L2_TUNER_RADIO; |
232 | 230 | ||
233 | mult = (fmr2->flags & V4L2_TUNER_CAP_LOW) ? 1 : 1000; | 231 | v->rangelow = RSF16_MINFREQ; |
234 | v->rangelow = RSF16_MINFREQ / mult; | 232 | v->rangehigh = RSF16_MAXFREQ; |
235 | v->rangehigh = RSF16_MAXFREQ / mult; | ||
236 | v->rxsubchans = V4L2_TUNER_SUB_MONO | V4L2_TUNER_SUB_STEREO; | 233 | v->rxsubchans = V4L2_TUNER_SUB_MONO | V4L2_TUNER_SUB_STEREO; |
237 | v->capability = fmr2->flags&V4L2_TUNER_CAP_LOW; | 234 | v->capability = V4L2_TUNER_CAP_LOW; |
238 | v->audmode = fmr2->stereo ? V4L2_TUNER_MODE_STEREO: | 235 | v->audmode = fmr2->stereo ? V4L2_TUNER_MODE_STEREO: |
239 | V4L2_TUNER_MODE_MONO; | 236 | V4L2_TUNER_MODE_MONO; |
240 | mutex_lock(&fmr2->lock); | 237 | mutex_lock(&fmr2->lock); |
@@ -254,8 +251,6 @@ static int vidioc_s_frequency(struct file *file, void *priv, | |||
254 | { | 251 | { |
255 | struct fmr2 *fmr2 = video_drvdata(file); | 252 | struct fmr2 *fmr2 = video_drvdata(file); |
256 | 253 | ||
257 | if (!(fmr2->flags & V4L2_TUNER_CAP_LOW)) | ||
258 | f->frequency *= 1000; | ||
259 | if (f->frequency < RSF16_MINFREQ || | 254 | if (f->frequency < RSF16_MINFREQ || |
260 | f->frequency > RSF16_MAXFREQ) | 255 | f->frequency > RSF16_MAXFREQ) |
261 | return -EINVAL; | 256 | return -EINVAL; |
@@ -279,8 +274,6 @@ static int vidioc_g_frequency(struct file *file, void *priv, | |||
279 | 274 | ||
280 | f->type = V4L2_TUNER_RADIO; | 275 | f->type = V4L2_TUNER_RADIO; |
281 | f->frequency = fmr2->curfreq; | 276 | f->frequency = fmr2->curfreq; |
282 | if (!(fmr2->flags & V4L2_TUNER_CAP_LOW)) | ||
283 | f->frequency /= 1000; | ||
284 | return 0; | 277 | return 0; |
285 | } | 278 | } |
286 | 279 | ||
@@ -406,7 +399,6 @@ static int __init fmr2_init(void) | |||
406 | strlcpy(v4l2_dev->name, "sf16fmr2", sizeof(v4l2_dev->name)); | 399 | strlcpy(v4l2_dev->name, "sf16fmr2", sizeof(v4l2_dev->name)); |
407 | fmr2->io = io; | 400 | fmr2->io = io; |
408 | fmr2->stereo = 1; | 401 | fmr2->stereo = 1; |
409 | fmr2->flags = V4L2_TUNER_CAP_LOW; | ||
410 | mutex_init(&fmr2->lock); | 402 | mutex_init(&fmr2->lock); |
411 | 403 | ||
412 | if (!request_region(fmr2->io, 2, "sf16fmr2")) { | 404 | if (!request_region(fmr2->io, 2, "sf16fmr2")) { |