aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-13 17:03:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-13 17:03:59 -0400
commitcf2fa66055d718ae13e62451bb546505f63906a2 (patch)
treee206d3f04e74a34e9aa88d21af6c26eea21d4121 /sound
parent4501a466f28788485604ee42641d7a5fe7258d16 (diff)
parent57f51dbc45f65f7ee1e8c8f77200bb8000e3e271 (diff)
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (313 commits) V4L/DVB (9186): Added support for Prof 7300 DVB-S/S2 cards V4L/DVB (9185): S2API: Ensure we have a reasonable ROLLOFF default V4L/DVB (9184): cx24116: Change the default SNR units back to percentage by default. V4L/DVB (9183): S2API: Return error of the caller provides 0 commands. V4L/DVB (9182): S2API: Added support for DTV_HIERARCHY V4L/DVB (9181): S2API: Add support fot DTV_GUARD_INTERVAL and DTV_TRANSMISSION_MODE V4L/DVB (9180): S2API: Added support for DTV_CODE_RATE_HP/LP V4L/DVB (9179): S2API: frontend.h cleanup V4L/DVB (9178): cx24116: Add module parameter to return SNR as ESNO. V4L/DVB (9177): S2API: Change _8PSK / _16APSK to PSK_8 and APSK_16 V4L/DVB (9176): Add support for DvbWorld USB cards with STV0288 demodulator. V4L/DVB (9175): Remove NULL pointer in stb6000 driver. V4L/DVB (9174): Allow custom inittab for ST STV0288 demodulator. V4L/DVB (9173): S2API: Remove the hardcoded command limit during validation V4L/DVB (9172): S2API: Bugfix related to DVB-S / DVB-S2 tuning for the legacy API. V4L/DVB (9171): S2API: Stop an OOPS if illegal commands are dumped in S2API. V4L/DVB (9170): cx24116: Sanity checking to data input via S2API to the cx24116 demod. V4L/DVB (9169): uvcvideo: Support two new Bison Electronics webcams. V4L/DVB (9168): Add support for MSI TV@nywhere Plus remote V4L/DVB: v4l2-dev: remove duplicated #include ...
Diffstat (limited to 'sound')
-rw-r--r--sound/i2c/other/tea575x-tuner.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/sound/i2c/other/tea575x-tuner.c b/sound/i2c/other/tea575x-tuner.c
index 83e90057270e..c13a178383ba 100644
--- a/sound/i2c/other/tea575x-tuner.c
+++ b/sound/i2c/other/tea575x-tuner.c
@@ -87,8 +87,7 @@ static void snd_tea575x_set_freq(struct snd_tea575x *tea)
87static int snd_tea575x_ioctl(struct inode *inode, struct file *file, 87static int snd_tea575x_ioctl(struct inode *inode, struct file *file,
88 unsigned int cmd, unsigned long data) 88 unsigned int cmd, unsigned long data)
89{ 89{
90 struct video_device *dev = video_devdata(file); 90 struct snd_tea575x *tea = video_drvdata(file);
91 struct snd_tea575x *tea = video_get_drvdata(dev);
92 void __user *arg = (void __user *)data; 91 void __user *arg = (void __user *)data;
93 92
94 switch(cmd) { 93 switch(cmd) {
@@ -175,6 +174,21 @@ static void snd_tea575x_release(struct video_device *vfd)
175{ 174{
176} 175}
177 176
177static int snd_tea575x_exclusive_open(struct inode *inode, struct file *file)
178{
179 struct snd_tea575x *tea = video_drvdata(file);
180
181 return test_and_set_bit(0, &tea->in_use) ? -EBUSY : 0;
182}
183
184static int snd_tea575x_exclusive_release(struct inode *inode, struct file *file)
185{
186 struct snd_tea575x *tea = video_drvdata(file);
187
188 clear_bit(0, &tea->in_use);
189 return 0;
190}
191
178/* 192/*
179 * initialize all the tea575x chips 193 * initialize all the tea575x chips
180 */ 194 */
@@ -193,9 +207,10 @@ void snd_tea575x_init(struct snd_tea575x *tea)
193 tea->vd.release = snd_tea575x_release; 207 tea->vd.release = snd_tea575x_release;
194 video_set_drvdata(&tea->vd, tea); 208 video_set_drvdata(&tea->vd, tea);
195 tea->vd.fops = &tea->fops; 209 tea->vd.fops = &tea->fops;
210 tea->in_use = 0;
196 tea->fops.owner = tea->card->module; 211 tea->fops.owner = tea->card->module;
197 tea->fops.open = video_exclusive_open; 212 tea->fops.open = snd_tea575x_exclusive_open;
198 tea->fops.release = video_exclusive_release; 213 tea->fops.release = snd_tea575x_exclusive_release;
199 tea->fops.ioctl = snd_tea575x_ioctl; 214 tea->fops.ioctl = snd_tea575x_ioctl;
200 if (video_register_device(&tea->vd, VFL_TYPE_RADIO, tea->dev_nr - 1) < 0) { 215 if (video_register_device(&tea->vd, VFL_TYPE_RADIO, tea->dev_nr - 1) < 0) {
201 snd_printk(KERN_ERR "unable to register tea575x tuner\n"); 216 snd_printk(KERN_ERR "unable to register tea575x tuner\n");