aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pcmcia/vx/vxpocket.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pcmcia/vx/vxpocket.c')
-rw-r--r--sound/pcmcia/vx/vxpocket.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c
index f6eed4259d17..4004b35e8af5 100644
--- a/sound/pcmcia/vx/vxpocket.c
+++ b/sound/pcmcia/vx/vxpocket.c
@@ -208,7 +208,7 @@ static int snd_vxpocket_assign_resources(struct vx_core *chip, int port, int irq
208#define CS_CHECK(fn, ret) \ 208#define CS_CHECK(fn, ret) \
209do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) 209do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
210 210
211static void vxpocket_config(struct pcmcia_device *link) 211static int vxpocket_config(struct pcmcia_device *link)
212{ 212{
213 struct vx_core *chip = link->priv; 213 struct vx_core *chip = link->priv;
214 struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip; 214 struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip;
@@ -221,7 +221,7 @@ static void vxpocket_config(struct pcmcia_device *link)
221 parse = kmalloc(sizeof(*parse), GFP_KERNEL); 221 parse = kmalloc(sizeof(*parse), GFP_KERNEL);
222 if (! parse) { 222 if (! parse) {
223 snd_printk(KERN_ERR "vx: cannot allocate\n"); 223 snd_printk(KERN_ERR "vx: cannot allocate\n");
224 return; 224 return -ENOMEM;
225 } 225 }
226 tuple.Attributes = 0; 226 tuple.Attributes = 0;
227 tuple.TupleData = (cisdata_t *)buf; 227 tuple.TupleData = (cisdata_t *)buf;
@@ -265,13 +265,14 @@ static void vxpocket_config(struct pcmcia_device *link)
265 link->dev_node = &vxp->node; 265 link->dev_node = &vxp->node;
266 link->state &= ~DEV_CONFIG_PENDING; 266 link->state &= ~DEV_CONFIG_PENDING;
267 kfree(parse); 267 kfree(parse);
268 return; 268 return 9;
269 269
270cs_failed: 270cs_failed:
271 cs_error(link, last_fn, last_ret); 271 cs_error(link, last_fn, last_ret);
272failed: 272failed:
273 pcmcia_disable_device(link); 273 pcmcia_disable_device(link);
274 kfree(parse); 274 kfree(parse);
275 return -ENODEV;
275} 276}
276 277
277#ifdef CONFIG_PM 278#ifdef CONFIG_PM
@@ -311,7 +312,7 @@ static int vxp_resume(struct pcmcia_device *link)
311 312
312/* 313/*
313 */ 314 */
314static int vxpocket_attach(struct pcmcia_device *p_dev) 315static int vxpocket_probe(struct pcmcia_device *p_dev)
315{ 316{
316 struct snd_card *card; 317 struct snd_card *card;
317 struct snd_vxpocket *vxp; 318 struct snd_vxpocket *vxp;
@@ -349,9 +350,7 @@ static int vxpocket_attach(struct pcmcia_device *p_dev)
349 vxp->p_dev = p_dev; 350 vxp->p_dev = p_dev;
350 vxp->p_dev->state |= DEV_PRESENT | DEV_CONFIG_PENDING; 351 vxp->p_dev->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
351 352
352 vxpocket_config(p_dev); 353 return vxpocket_config(p_dev);
353
354 return 0;
355} 354}
356 355
357static void vxpocket_detach(struct pcmcia_device *link) 356static void vxpocket_detach(struct pcmcia_device *link)
@@ -387,7 +386,7 @@ static struct pcmcia_driver vxp_cs_driver = {
387 .drv = { 386 .drv = {
388 .name = "snd-vxpocket", 387 .name = "snd-vxpocket",
389 }, 388 },
390 .probe = vxpocket_attach, 389 .probe = vxpocket_probe,
391 .remove = vxpocket_detach, 390 .remove = vxpocket_detach,
392 .id_table = vxp_ids, 391 .id_table = vxp_ids,
393#ifdef CONFIG_PM 392#ifdef CONFIG_PM