aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pcmcia/vx/vxpocket.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-09-09 17:17:20 +0200
committerTakashi Iwai <tiwai@suse.de>2014-09-15 15:52:03 +0200
commitdb0a5214b8d6cc7a90ce3336d24a85b90cbb4e67 (patch)
treefdfcfaee149e83613d9854a763bbe3fe95f60292 /sound/pcmcia/vx/vxpocket.c
parentsound: pci: au88x0: printk replacement (diff)
downloadlinux-dev-db0a5214b8d6cc7a90ce3336d24a85b90cbb4e67.tar.xz
linux-dev-db0a5214b8d6cc7a90ce3336d24a85b90cbb4e67.zip
ALSA: vx: Use nonatomic PCM ops
Rewrite VXpocket and VX222 drivers to use the new PCM nonatomic ops. The former irq tasklet is replaced with a threaded irq handler, and the tasklet for the PCM delayed start is simply merged into the normal PCM trigger, as well as the replacement of spinlock with mutex. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pcmcia/vx/vxpocket.c')
-rw-r--r--sound/pcmcia/vx/vxpocket.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c
index 786e7e139c9e..92ec11456e3a 100644
--- a/sound/pcmcia/vx/vxpocket.c
+++ b/sound/pcmcia/vx/vxpocket.c
@@ -62,6 +62,7 @@ static unsigned int card_alloc;
*/
static void vxpocket_release(struct pcmcia_device *link)
{
+ free_irq(link->irq, link->priv);
pcmcia_disable_device(link);
}
@@ -227,11 +228,13 @@ static int vxpocket_config(struct pcmcia_device *link)
ret = pcmcia_request_io(link);
if (ret)
- goto failed;
+ goto failed_preirq;
- ret = pcmcia_request_irq(link, snd_vx_irq_handler);
+ ret = request_threaded_irq(link->irq, snd_vx_irq_handler,
+ snd_vx_threaded_irq_handler,
+ IRQF_SHARED, link->devname, link->priv);
if (ret)
- goto failed;
+ goto failed_preirq;
ret = pcmcia_enable_device(link);
if (ret)
@@ -245,7 +248,9 @@ static int vxpocket_config(struct pcmcia_device *link)
return 0;
-failed:
+ failed:
+ free_irq(link->irq, link->priv);
+failed_preirq:
pcmcia_disable_device(link);
return -ENODEV;
}