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
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
sound
/
isa
/
opti9xx
/
opti92x-ad1848.c
diff --git
a/sound/isa/opti9xx/opti92x-ad1848.c
b/sound/isa/opti9xx/opti92x-ad1848.c
index
65b28cb
..
df22737
100644
(file)
--- a/
sound/isa/opti9xx/opti92x-ad1848.c
+++ b/
sound/isa/opti9xx/opti92x-ad1848.c
@@
-1090,7
+1090,7
@@
static void snd_opti93x_overrange(struct snd_opti93x *chip)
spin_unlock_irqrestore(&chip->lock, flags);
}
spin_unlock_irqrestore(&chip->lock, flags);
}
-static irqreturn_t snd_opti93x_interrupt(int irq, void *dev_id
, struct pt_regs *regs
)
+static irqreturn_t snd_opti93x_interrupt(int irq, void *dev_id)
{
struct snd_opti93x *codec = dev_id;
unsigned char status;
{
struct snd_opti93x *codec = dev_id;
unsigned char status;
@@
-1291,7
+1291,7
@@
static int snd_opti93x_create(struct snd_card *card, struct snd_opti9xx *chip,
}
codec->dma2 = chip->dma2;
}
codec->dma2 = chip->dma2;
- if (request_irq(chip->irq, snd_opti93x_interrupt,
SA_INTERRUPT
, DRIVER_NAME" - WSS", codec)) {
+ if (request_irq(chip->irq, snd_opti93x_interrupt,
IRQF_DISABLED
, DRIVER_NAME" - WSS", codec)) {
snd_printk(KERN_ERR "opti9xx: can't grab IRQ %d\n", chip->irq);
snd_opti93x_free(codec);
return -EBUSY;
snd_printk(KERN_ERR "opti9xx: can't grab IRQ %d\n", chip->irq);
snd_opti93x_free(codec);
return -EBUSY;
@@
-1683,6
+1683,8
@@
static int __init snd_card_opti9xx_pnp(struct snd_opti9xx *chip, struct pnp_card
struct pnp_resource_table *cfg = kmalloc(sizeof(*cfg), GFP_KERNEL);
int err;
struct pnp_resource_table *cfg = kmalloc(sizeof(*cfg), GFP_KERNEL);
int err;
+ if (!cfg)
+ return -ENOMEM;
chip->dev = pnp_request_card_device(card, pid->devs[0].id, NULL);
if (chip->dev == NULL) {
kfree(cfg);
chip->dev = pnp_request_card_device(card, pid->devs[0].id, NULL);
if (chip->dev == NULL) {
kfree(cfg);
@@
-1863,7
+1865,7
@@
static int __init snd_opti9xx_probe(struct snd_card *card)
rmidi = NULL;
else
if ((error = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401,
rmidi = NULL;
else
if ((error = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401,
- chip->mpu_port, 0, chip->mpu_irq,
SA_INTERRUPT
,
+ chip->mpu_port, 0, chip->mpu_irq,
IRQF_DISABLED
,
&rmidi)))
snd_printk(KERN_WARNING "no MPU-401 device at 0x%lx?\n",
chip->mpu_port);
&rmidi)))
snd_printk(KERN_WARNING "no MPU-401 device at 0x%lx?\n",
chip->mpu_port);
@@
-2099,8
+2101,11
@@
static int __init alsa_card_opti9xx_init(void)
return error;
device = platform_device_register_simple(DRIVER_NAME, -1, NULL, 0);
if (!IS_ERR(device)) {
return error;
device = platform_device_register_simple(DRIVER_NAME, -1, NULL, 0);
if (!IS_ERR(device)) {
- snd_opti9xx_platform_device = device;
- return 0;
+ if (platform_get_drvdata(device)) {
+ snd_opti9xx_platform_device = device;
+ return 0;
+ }
+ platform_device_unregister(device);
}
platform_driver_unregister(&snd_opti9xx_driver);
}
}
platform_driver_unregister(&snd_opti9xx_driver);
}