git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge to kernel-2.6.20-1.2949.fc6.vs2.2.0.1
[linux-2.6.git]
/
sound
/
isa
/
gus
/
gusmax.c
diff --git
a/sound/isa/gus/gusmax.c
b/sound/isa/gus/gusmax.c
index
d4d2b2a
..
c1c69e3
100644
(file)
--- a/
sound/isa/gus/gusmax.c
+++ b/
sound/isa/gus/gusmax.c
@@
-105,9
+105,9
@@
static int __init snd_gusmax_detect(struct snd_gus_card * gus)
return 0;
}
return 0;
}
-static irqreturn_t snd_gusmax_interrupt(int irq, void *dev_id
, struct pt_regs *regs
)
+static irqreturn_t snd_gusmax_interrupt(int irq, void *dev_id)
{
{
- struct snd_gusmax *maxcard =
(struct snd_gusmax *)
dev_id;
+ struct snd_gusmax *maxcard = dev_id;
int loop, max = 5;
int handled = 0;
int loop, max = 5;
int handled = 0;
@@
-115,12
+115,12
@@
static irqreturn_t snd_gusmax_interrupt(int irq, void *dev_id, struct pt_regs *r
loop = 0;
if (inb(maxcard->gus_status_reg)) {
handled = 1;
loop = 0;
if (inb(maxcard->gus_status_reg)) {
handled = 1;
- snd_gus_interrupt(irq, maxcard->gus
, regs
);
+ snd_gus_interrupt(irq, maxcard->gus);
loop++;
}
if (inb(maxcard->pcm_status_reg) & 0x01) { /* IRQ bit is set? */
handled = 1;
loop++;
}
if (inb(maxcard->pcm_status_reg) & 0x01) { /* IRQ bit is set? */
handled = 1;
- snd_cs4231_interrupt(irq, maxcard->cs4231
, regs
);
+ snd_cs4231_interrupt(irq, maxcard->cs4231);
loop++;
}
} while (loop && --max > 0);
loop++;
}
} while (loop && --max > 0);
@@
-292,7
+292,7
@@
static int __init snd_gusmax_probe(struct platform_device *pdev)
goto _err;
}
goto _err;
}
- if (request_irq(xirq, snd_gusmax_interrupt,
SA_INTERRUPT
, "GUS MAX", (void *)maxcard)) {
+ if (request_irq(xirq, snd_gusmax_interrupt,
IRQF_DISABLED
, "GUS MAX", (void *)maxcard)) {
snd_printk(KERN_ERR PFX "unable to grab IRQ %d\n", xirq);
err = -EBUSY;
goto _err;
snd_printk(KERN_ERR PFX "unable to grab IRQ %d\n", xirq);
err = -EBUSY;
goto _err;
@@
-384,13
+384,17
@@
static int __init alsa_card_gusmax_init(void)
return err;
cards = 0;
return err;
cards = 0;
- for (i = 0; i < SNDRV_CARDS
&& enable[i]
; i++) {
+ for (i = 0; i < SNDRV_CARDS; i++) {
struct platform_device *device;
struct platform_device *device;
+ if (! enable[i])
+ continue;
device = platform_device_register_simple(GUSMAX_DRIVER,
i, NULL, 0);
device = platform_device_register_simple(GUSMAX_DRIVER,
i, NULL, 0);
- if (IS_ERR(device)) {
- err = PTR_ERR(device);
- goto errout;
+ if (IS_ERR(device))
+ continue;
+ if (!platform_get_drvdata(device)) {
+ platform_device_unregister(device);
+ continue;
}
devices[i] = device;
cards++;
}
devices[i] = device;
cards++;
@@
-399,14
+403,10
@@
static int __init alsa_card_gusmax_init(void)
#ifdef MODULE
printk(KERN_ERR "GUS MAX soundcard not found or device busy\n");
#endif
#ifdef MODULE
printk(KERN_ERR "GUS MAX soundcard not found or device busy\n");
#endif
-
err = -ENODEV
;
-
goto errout
;
+
snd_gusmax_unregister_all()
;
+
return -ENODEV
;
}
return 0;
}
return 0;
-
- errout:
- snd_gusmax_unregister_all();
- return err;
}
static void __exit alsa_card_gusmax_exit(void)
}
static void __exit alsa_card_gusmax_exit(void)