aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pcmcia/pdaudiocf
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pcmcia/pdaudiocf')
-rw-r--r--sound/pcmcia/pdaudiocf/pdaudiocf.c19
-rw-r--r--sound/pcmcia/pdaudiocf/pdaudiocf_core.c23
-rw-r--r--sound/pcmcia/pdaudiocf/pdaudiocf_irq.c4
3 files changed, 28 insertions, 18 deletions
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c
index 819aaaac432f..7dea74b71cf1 100644
--- a/sound/pcmcia/pdaudiocf/pdaudiocf.c
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c
@@ -91,7 +91,7 @@ static int snd_pdacf_dev_free(struct snd_device *device)
*/
static int snd_pdacf_probe(struct pcmcia_device *link)
{
- int i;
+ int i, err;
struct snd_pdacf *pdacf;
struct snd_card *card;
static struct snd_device_ops ops = {
@@ -112,20 +112,23 @@ static int snd_pdacf_probe(struct pcmcia_device *link)
return -ENODEV; /* disabled explicitly */
/* ok, create a card instance */
- card = snd_card_new(index[i], id[i], THIS_MODULE, 0);
- if (card == NULL) {
+ err = snd_card_create(index[i], id[i], THIS_MODULE, 0, &card);
+ if (err < 0) {
snd_printk(KERN_ERR "pdacf: cannot create a card instance\n");
- return -ENOMEM;
+ return err;
}
pdacf = snd_pdacf_create(card);
- if (! pdacf)
- return -EIO;
+ if (!pdacf) {
+ snd_card_free(card);
+ return -ENOMEM;
+ }
- if (snd_device_new(card, SNDRV_DEV_LOWLEVEL, pdacf, &ops) < 0) {
+ err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, pdacf, &ops);
+ if (err < 0) {
kfree(pdacf);
snd_card_free(card);
- return -ENODEV;
+ return err;
}
snd_card_set_dev(card, &handle_to_dev(link));
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf_core.c b/sound/pcmcia/pdaudiocf/pdaudiocf_core.c
index dfa40b0ed86d..5d2afa0b0ce4 100644
--- a/sound/pcmcia/pdaudiocf/pdaudiocf_core.c
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf_core.c
@@ -82,14 +82,21 @@ static void pdacf_ak4117_write(void *private_data, unsigned char reg, unsigned c
#if 0
void pdacf_dump(struct snd_pdacf *chip)
{
- printk("PDAUDIOCF DUMP (0x%lx):\n", chip->port);
- printk("WPD : 0x%x\n", inw(chip->port + PDAUDIOCF_REG_WDP));
- printk("RDP : 0x%x\n", inw(chip->port + PDAUDIOCF_REG_RDP));
- printk("TCR : 0x%x\n", inw(chip->port + PDAUDIOCF_REG_TCR));
- printk("SCR : 0x%x\n", inw(chip->port + PDAUDIOCF_REG_SCR));
- printk("ISR : 0x%x\n", inw(chip->port + PDAUDIOCF_REG_ISR));
- printk("IER : 0x%x\n", inw(chip->port + PDAUDIOCF_REG_IER));
- printk("AK_IFR : 0x%x\n", inw(chip->port + PDAUDIOCF_REG_AK_IFR));
+ printk(KERN_DEBUG "PDAUDIOCF DUMP (0x%lx):\n", chip->port);
+ printk(KERN_DEBUG "WPD : 0x%x\n",
+ inw(chip->port + PDAUDIOCF_REG_WDP));
+ printk(KERN_DEBUG "RDP : 0x%x\n",
+ inw(chip->port + PDAUDIOCF_REG_RDP));
+ printk(KERN_DEBUG "TCR : 0x%x\n",
+ inw(chip->port + PDAUDIOCF_REG_TCR));
+ printk(KERN_DEBUG "SCR : 0x%x\n",
+ inw(chip->port + PDAUDIOCF_REG_SCR));
+ printk(KERN_DEBUG "ISR : 0x%x\n",
+ inw(chip->port + PDAUDIOCF_REG_ISR));
+ printk(KERN_DEBUG "IER : 0x%x\n",
+ inw(chip->port + PDAUDIOCF_REG_IER));
+ printk(KERN_DEBUG "AK_IFR : 0x%x\n",
+ inw(chip->port + PDAUDIOCF_REG_AK_IFR));
}
#endif
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf_irq.c b/sound/pcmcia/pdaudiocf/pdaudiocf_irq.c
index ea903c8e90dd..dcd32201bc8c 100644
--- a/sound/pcmcia/pdaudiocf/pdaudiocf_irq.c
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf_irq.c
@@ -269,7 +269,7 @@ void pdacf_tasklet(unsigned long private_data)
rdp = inw(chip->port + PDAUDIOCF_REG_RDP);
wdp = inw(chip->port + PDAUDIOCF_REG_WDP);
- // printk("TASKLET: rdp = %x, wdp = %x\n", rdp, wdp);
+ /* printk(KERN_DEBUG "TASKLET: rdp = %x, wdp = %x\n", rdp, wdp); */
size = wdp - rdp;
if (size < 0)
size += 0x10000;
@@ -321,5 +321,5 @@ void pdacf_tasklet(unsigned long private_data)
spin_lock(&chip->reg_lock);
}
spin_unlock(&chip->reg_lock);
- // printk("TASKLET: end\n");
+ /* printk(KERN_DEBUG "TASKLET: end\n"); */
}