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-sf16fmi.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-sf16fmi.c')
-rw-r--r-- | drivers/media/radio/radio-sf16fmi.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/media/radio/radio-sf16fmi.c b/drivers/media/radio/radio-sf16fmi.c index 5cf6c45b91fe..e598b5471d8a 100644 --- a/drivers/media/radio/radio-sf16fmi.c +++ b/drivers/media/radio/radio-sf16fmi.c | |||
@@ -49,7 +49,6 @@ struct fmi | |||
49 | int io; | 49 | int io; |
50 | int curvol; /* 1 or 0 */ | 50 | int curvol; /* 1 or 0 */ |
51 | unsigned long curfreq; /* freq in kHz */ | 51 | unsigned long curfreq; /* freq in kHz */ |
52 | __u32 flags; | ||
53 | struct mutex lock; | 52 | struct mutex lock; |
54 | }; | 53 | }; |
55 | 54 | ||
@@ -57,7 +56,7 @@ static struct fmi fmi_card; | |||
57 | static struct pnp_dev *dev; | 56 | static struct pnp_dev *dev; |
58 | 57 | ||
59 | /* freq is in 1/16 kHz to internal number, hw precision is 50 kHz */ | 58 | /* freq is in 1/16 kHz to internal number, hw precision is 50 kHz */ |
60 | /* It is only useful to give freq in intervall of 800 (=0.05Mhz), | 59 | /* It is only useful to give freq in interval of 800 (=0.05Mhz), |
61 | * other bits will be truncated, e.g 92.7400016 -> 92.7, but | 60 | * other bits will be truncated, e.g 92.7400016 -> 92.7, but |
62 | * 92.7400017 -> 92.75 | 61 | * 92.7400017 -> 92.75 |
63 | */ | 62 | */ |
@@ -142,7 +141,6 @@ static int vidioc_querycap(struct file *file, void *priv, | |||
142 | static int vidioc_g_tuner(struct file *file, void *priv, | 141 | static int vidioc_g_tuner(struct file *file, void *priv, |
143 | struct v4l2_tuner *v) | 142 | struct v4l2_tuner *v) |
144 | { | 143 | { |
145 | int mult; | ||
146 | struct fmi *fmi = video_drvdata(file); | 144 | struct fmi *fmi = video_drvdata(file); |
147 | 145 | ||
148 | if (v->index > 0) | 146 | if (v->index > 0) |
@@ -150,11 +148,10 @@ static int vidioc_g_tuner(struct file *file, void *priv, | |||
150 | 148 | ||
151 | strlcpy(v->name, "FM", sizeof(v->name)); | 149 | strlcpy(v->name, "FM", sizeof(v->name)); |
152 | v->type = V4L2_TUNER_RADIO; | 150 | v->type = V4L2_TUNER_RADIO; |
153 | mult = (fmi->flags & V4L2_TUNER_CAP_LOW) ? 1 : 1000; | 151 | v->rangelow = RSF16_MINFREQ; |
154 | v->rangelow = RSF16_MINFREQ / mult; | 152 | v->rangehigh = RSF16_MAXFREQ; |
155 | v->rangehigh = RSF16_MAXFREQ / mult; | ||
156 | v->rxsubchans = V4L2_TUNER_SUB_MONO | V4L2_TUNER_SUB_STEREO; | 153 | v->rxsubchans = V4L2_TUNER_SUB_MONO | V4L2_TUNER_SUB_STEREO; |
157 | v->capability = fmi->flags & V4L2_TUNER_CAP_LOW; | 154 | v->capability = V4L2_TUNER_CAP_LOW; |
158 | v->audmode = V4L2_TUNER_MODE_STEREO; | 155 | v->audmode = V4L2_TUNER_MODE_STEREO; |
159 | v->signal = fmi_getsigstr(fmi); | 156 | v->signal = fmi_getsigstr(fmi); |
160 | return 0; | 157 | return 0; |
@@ -171,8 +168,6 @@ static int vidioc_s_frequency(struct file *file, void *priv, | |||
171 | { | 168 | { |
172 | struct fmi *fmi = video_drvdata(file); | 169 | struct fmi *fmi = video_drvdata(file); |
173 | 170 | ||
174 | if (!(fmi->flags & V4L2_TUNER_CAP_LOW)) | ||
175 | f->frequency *= 1000; | ||
176 | if (f->frequency < RSF16_MINFREQ || | 171 | if (f->frequency < RSF16_MINFREQ || |
177 | f->frequency > RSF16_MAXFREQ) | 172 | f->frequency > RSF16_MAXFREQ) |
178 | return -EINVAL; | 173 | return -EINVAL; |
@@ -189,8 +184,6 @@ static int vidioc_g_frequency(struct file *file, void *priv, | |||
189 | 184 | ||
190 | f->type = V4L2_TUNER_RADIO; | 185 | f->type = V4L2_TUNER_RADIO; |
191 | f->frequency = fmi->curfreq; | 186 | f->frequency = fmi->curfreq; |
192 | if (!(fmi->flags & V4L2_TUNER_CAP_LOW)) | ||
193 | f->frequency /= 1000; | ||
194 | return 0; | 187 | return 0; |
195 | } | 188 | } |
196 | 189 | ||
@@ -347,7 +340,6 @@ static int __init fmi_init(void) | |||
347 | return res; | 340 | return res; |
348 | } | 341 | } |
349 | 342 | ||
350 | fmi->flags = V4L2_TUNER_CAP_LOW; | ||
351 | strlcpy(fmi->vdev.name, v4l2_dev->name, sizeof(fmi->vdev.name)); | 343 | strlcpy(fmi->vdev.name, v4l2_dev->name, sizeof(fmi->vdev.name)); |
352 | fmi->vdev.v4l2_dev = v4l2_dev; | 344 | fmi->vdev.v4l2_dev = v4l2_dev; |
353 | fmi->vdev.fops = &fmi_fops; | 345 | fmi->vdev.fops = &fmi_fops; |