summaryrefslogtreecommitdiff
path: root/sound/pcmcia
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pcmcia')
-rw-r--r--sound/pcmcia/pdaudiocf/Makefile2
-rw-r--r--sound/pcmcia/pdaudiocf/pdaudiocf.c21
-rw-r--r--sound/pcmcia/pdaudiocf/pdaudiocf_core.c36
-rw-r--r--sound/pcmcia/pdaudiocf/pdaudiocf_irq.c3
-rw-r--r--sound/pcmcia/vx/Makefile2
-rw-r--r--sound/pcmcia/vx/vxp_ops.c10
-rw-r--r--sound/pcmcia/vx/vxpocket.c27
7 files changed, 40 insertions, 61 deletions
diff --git a/sound/pcmcia/pdaudiocf/Makefile b/sound/pcmcia/pdaudiocf/Makefile
index ea0d67576df9..34a288c1eebd 100644
--- a/sound/pcmcia/pdaudiocf/Makefile
+++ b/sound/pcmcia/pdaudiocf/Makefile
@@ -4,6 +4,6 @@
# Copyright (c) 2004 by Jaroslav Kysela <perex@perex.cz>
#
-snd-pdaudiocf-objs := pdaudiocf.o pdaudiocf_core.o pdaudiocf_irq.o pdaudiocf_pcm.o
+snd-pdaudiocf-y := pdaudiocf.o pdaudiocf_core.o pdaudiocf_irq.o pdaudiocf_pcm.o
obj-$(CONFIG_SND_PDAUDIOCF) += snd-pdaudiocf.o
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c
index 8363ec08df5d..494460746614 100644
--- a/sound/pcmcia/pdaudiocf/pdaudiocf.c
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c
@@ -85,14 +85,13 @@ static int snd_pdacf_probe(struct pcmcia_device *link)
.dev_free = snd_pdacf_dev_free,
};
- snd_printdd(KERN_DEBUG "pdacf_attach called\n");
/* find an empty slot from the card list */
for (i = 0; i < SNDRV_CARDS; i++) {
if (! card_list[i])
break;
}
if (i >= SNDRV_CARDS) {
- snd_printk(KERN_ERR "pdacf: too many cards found\n");
+ dev_err(&link->dev, "pdacf: too many cards found\n");
return -EINVAL;
}
if (! enable[i])
@@ -102,7 +101,7 @@ static int snd_pdacf_probe(struct pcmcia_device *link)
err = snd_card_new(&link->dev, index[i], id[i], THIS_MODULE,
0, &card);
if (err < 0) {
- snd_printk(KERN_ERR "pdacf: cannot create a card instance\n");
+ dev_err(&link->dev, "pdacf: cannot create a card instance\n");
return err;
}
@@ -152,7 +151,7 @@ static int snd_pdacf_assign_resources(struct snd_pdacf *pdacf, int port, int irq
int err;
struct snd_card *card = pdacf->card;
- snd_printdd(KERN_DEBUG "pdacf assign resources: port = 0x%x, irq = %d\n", port, irq);
+ dev_dbg(card->dev, "pdacf assign resources: port = 0x%x, irq = %d\n", port, irq);
pdacf->port = port;
pdacf->irq = irq;
pdacf->chip_status |= PDAUDIOCF_STAT_IS_CONFIGURED;
@@ -185,8 +184,6 @@ static void snd_pdacf_detach(struct pcmcia_device *link)
{
struct snd_pdacf *chip = link->priv;
- snd_printdd(KERN_DEBUG "pdacf_detach called\n");
-
if (chip->chip_status & PDAUDIOCF_STAT_IS_CONFIGURED)
snd_pdacf_powerdown(chip);
chip->chip_status |= PDAUDIOCF_STAT_IS_STALE; /* to be sure */
@@ -203,7 +200,6 @@ static int pdacf_config(struct pcmcia_device *link)
struct snd_pdacf *pdacf = link->priv;
int ret;
- snd_printdd(KERN_DEBUG "pdacf_config called\n");
link->config_index = 0x5;
link->config_flags |= CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ;
@@ -241,11 +237,8 @@ static int pdacf_suspend(struct pcmcia_device *link)
{
struct snd_pdacf *chip = link->priv;
- snd_printdd(KERN_DEBUG "SUSPEND\n");
- if (chip) {
- snd_printdd(KERN_DEBUG "snd_pdacf_suspend calling\n");
+ if (chip)
snd_pdacf_suspend(chip);
- }
return 0;
}
@@ -254,14 +247,10 @@ static int pdacf_resume(struct pcmcia_device *link)
{
struct snd_pdacf *chip = link->priv;
- snd_printdd(KERN_DEBUG "RESUME\n");
if (pcmcia_dev_present(link)) {
- if (chip) {
- snd_printdd(KERN_DEBUG "calling snd_pdacf_resume\n");
+ if (chip)
snd_pdacf_resume(chip);
- }
}
- snd_printdd(KERN_DEBUG "resume done!\n");
return 0;
}
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf_core.c b/sound/pcmcia/pdaudiocf/pdaudiocf_core.c
index 5537c0882aa5..11aacc7e3f0b 100644
--- a/sound/pcmcia/pdaudiocf/pdaudiocf_core.c
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf_core.c
@@ -28,7 +28,7 @@ static unsigned char pdacf_ak4117_read(void *private_data, unsigned char reg)
udelay(5);
if (--timeout == 0) {
spin_unlock_irqrestore(&chip->ak4117_lock, flags);
- snd_printk(KERN_ERR "AK4117 ready timeout (read)\n");
+ dev_err(chip->card->dev, "AK4117 ready timeout (read)\n");
return 0;
}
}
@@ -38,7 +38,7 @@ static unsigned char pdacf_ak4117_read(void *private_data, unsigned char reg)
udelay(5);
if (--timeout == 0) {
spin_unlock_irqrestore(&chip->ak4117_lock, flags);
- snd_printk(KERN_ERR "AK4117 read timeout (read2)\n");
+ dev_err(chip->card->dev, "AK4117 read timeout (read2)\n");
return 0;
}
}
@@ -59,7 +59,7 @@ static void pdacf_ak4117_write(void *private_data, unsigned char reg, unsigned c
udelay(5);
if (--timeout == 0) {
spin_unlock_irqrestore(&chip->ak4117_lock, flags);
- snd_printk(KERN_ERR "AK4117 ready timeout (write)\n");
+ dev_err(chip->card->dev, "AK4117 ready timeout (write)\n");
return;
}
}
@@ -70,21 +70,21 @@ static void pdacf_ak4117_write(void *private_data, unsigned char reg, unsigned c
#if 0
void pdacf_dump(struct snd_pdacf *chip)
{
- 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));
+ dev_dbg(chip->card->dev, "PDAUDIOCF DUMP (0x%lx):\n", chip->port);
+ dev_dbg(chip->card->dev, "WPD : 0x%x\n",
+ inw(chip->port + PDAUDIOCF_REG_WDP));
+ dev_dbg(chip->card->dev, "RDP : 0x%x\n",
+ inw(chip->port + PDAUDIOCF_REG_RDP));
+ dev_dbg(chip->card->dev, "TCR : 0x%x\n",
+ inw(chip->port + PDAUDIOCF_REG_TCR));
+ dev_dbg(chip->card->dev, "SCR : 0x%x\n",
+ inw(chip->port + PDAUDIOCF_REG_SCR));
+ dev_dbg(chip->card->dev, "ISR : 0x%x\n",
+ inw(chip->port + PDAUDIOCF_REG_ISR));
+ dev_dbg(chip->card->dev, "IER : 0x%x\n",
+ inw(chip->port + PDAUDIOCF_REG_IER));
+ dev_dbg(chip->card->dev, "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 f134b4a4622f..af40a2c8789a 100644
--- a/sound/pcmcia/pdaudiocf/pdaudiocf_irq.c
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf_irq.c
@@ -27,7 +27,7 @@ irqreturn_t pdacf_interrupt(int irq, void *dev)
stat = inw(chip->port + PDAUDIOCF_REG_ISR);
if (stat & (PDAUDIOCF_IRQLVL|PDAUDIOCF_IRQOVR)) {
if (stat & PDAUDIOCF_IRQOVR) /* should never happen */
- snd_printk(KERN_ERR "PDAUDIOCF SRAM buffer overrun detected!\n");
+ dev_err(chip->card->dev, "PDAUDIOCF SRAM buffer overrun detected!\n");
if (chip->pcm_substream)
wake_thread = true;
if (!(stat & PDAUDIOCF_IRQAKM))
@@ -257,7 +257,6 @@ irqreturn_t pdacf_threaded_irq(int irq, void *dev)
rdp = inw(chip->port + PDAUDIOCF_REG_RDP);
wdp = inw(chip->port + PDAUDIOCF_REG_WDP);
- /* printk(KERN_DEBUG "TASKLET: rdp = %x, wdp = %x\n", rdp, wdp); */
size = wdp - rdp;
if (size < 0)
size += 0x10000;
diff --git a/sound/pcmcia/vx/Makefile b/sound/pcmcia/vx/Makefile
index b25006e4d25a..abd187544946 100644
--- a/sound/pcmcia/vx/Makefile
+++ b/sound/pcmcia/vx/Makefile
@@ -4,6 +4,6 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@perex.cz>
#
-snd-vxpocket-objs := vxpocket.o vxp_ops.o vxp_mixer.o
+snd-vxpocket-y := vxpocket.o vxp_ops.o vxp_mixer.o
obj-$(CONFIG_SND_VXPOCKET) += snd-vxpocket.o
diff --git a/sound/pcmcia/vx/vxp_ops.c b/sound/pcmcia/vx/vxp_ops.c
index 4176abd73799..0bc5c5d9d157 100644
--- a/sound/pcmcia/vx/vxp_ops.c
+++ b/sound/pcmcia/vx/vxp_ops.c
@@ -84,7 +84,7 @@ static int vx_check_magic(struct vx_core *chip)
return 0;
msleep(10);
} while (time_after_eq(end_time, jiffies));
- snd_printk(KERN_ERR "cannot find xilinx magic word (%x)\n", c);
+ dev_err(chip->card->dev, "cannot find xilinx magic word (%x)\n", c);
return -EIO;
}
@@ -153,7 +153,6 @@ static int vxp_load_xilinx_binary(struct vx_core *_chip, const struct firmware *
vx_outb(chip, ICR, 0);
/* Wait for answer HF2 equal to 1 */
- snd_printdd(KERN_DEBUG "check ISR_HF2\n");
if (vx_check_isr(_chip, ISR_HF2, ISR_HF2, 20) < 0)
goto _error;
@@ -170,7 +169,9 @@ static int vxp_load_xilinx_binary(struct vx_core *_chip, const struct firmware *
goto _error;
c = vx_inb(chip, RXL);
if (c != (int)data)
- snd_printk(KERN_ERR "vxpocket: load xilinx mismatch at %d: 0x%x != 0x%x\n", i, c, (int)data);
+ dev_err(_chip->card->dev,
+ "vxpocket: load xilinx mismatch at %d: 0x%x != 0x%x\n",
+ i, c, (int)data);
}
/* reset HF1 */
@@ -188,7 +189,8 @@ static int vxp_load_xilinx_binary(struct vx_core *_chip, const struct firmware *
c |= (int)vx_inb(chip, RXM) << 8;
c |= vx_inb(chip, RXL);
- snd_printdd(KERN_DEBUG "xilinx: dsp size received 0x%x, orig 0x%zx\n", c, fw->size);
+ dev_dbg(_chip->card->dev,
+ "xilinx: dsp size received 0x%x, orig 0x%zx\n", c, fw->size);
vx_outb(chip, ICR, ICR_HF0);
diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c
index 7a0f0e73ceb2..d2d5f64d63b4 100644
--- a/sound/pcmcia/vx/vxpocket.c
+++ b/sound/pcmcia/vx/vxpocket.c
@@ -151,7 +151,8 @@ static int snd_vxpocket_assign_resources(struct vx_core *chip, int port, int irq
struct snd_card *card = chip->card;
struct snd_vxpocket *vxp = to_vxpocket(chip);
- snd_printdd(KERN_DEBUG "vxpocket assign resources: port = 0x%x, irq = %d\n", port, irq);
+ dev_dbg(chip->card->dev,
+ "vxpocket assign resources: port = 0x%x, irq = %d\n", port, irq);
vxp->port = port;
sprintf(card->shortname, "Digigram %s", card->driver);
@@ -178,13 +179,11 @@ static int vxpocket_config(struct pcmcia_device *link)
struct vx_core *chip = link->priv;
int ret;
- snd_printdd(KERN_DEBUG "vxpocket_config called\n");
-
/* redefine hardware record according to the VERSION1 string */
if (!strcmp(link->prod_id[1], "VX-POCKET")) {
- snd_printdd("VX-pocket is detected\n");
+ dev_dbg(chip->card->dev, "VX-pocket is detected\n");
} else {
- snd_printdd("VX-pocket 440 is detected\n");
+ dev_dbg(chip->card->dev, "VX-pocket 440 is detected\n");
/* overwrite the hardware information */
chip->hw = &vxp440_hw;
chip->type = vxp440_hw.type;
@@ -205,8 +204,6 @@ static int vxpocket_config(struct pcmcia_device *link)
if (ret)
goto failed;
- chip->dev = &link->dev;
-
if (snd_vxpocket_assign_resources(chip, link->resource[0]->start,
link->irq) < 0)
goto failed;
@@ -226,11 +223,8 @@ static int vxp_suspend(struct pcmcia_device *link)
{
struct vx_core *chip = link->priv;
- snd_printdd(KERN_DEBUG "SUSPEND\n");
- if (chip) {
- snd_printdd(KERN_DEBUG "snd_vx_suspend calling\n");
+ if (chip)
snd_vx_suspend(chip);
- }
return 0;
}
@@ -239,15 +233,10 @@ static int vxp_resume(struct pcmcia_device *link)
{
struct vx_core *chip = link->priv;
- snd_printdd(KERN_DEBUG "RESUME\n");
if (pcmcia_dev_present(link)) {
- //struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip;
- if (chip) {
- snd_printdd(KERN_DEBUG "calling snd_vx_resume\n");
+ if (chip)
snd_vx_resume(chip);
- }
}
- snd_printdd(KERN_DEBUG "resume done!\n");
return 0;
}
@@ -269,7 +258,7 @@ static int vxpocket_probe(struct pcmcia_device *p_dev)
break;
}
if (i >= SNDRV_CARDS) {
- snd_printk(KERN_ERR "vxpocket: too many cards found\n");
+ dev_err(&p_dev->dev, "vxpocket: too many cards found\n");
return -EINVAL;
}
if (! enable[i])
@@ -279,7 +268,7 @@ static int vxpocket_probe(struct pcmcia_device *p_dev)
err = snd_card_new(&p_dev->dev, index[i], id[i], THIS_MODULE,
0, &card);
if (err < 0) {
- snd_printk(KERN_ERR "vxpocket: cannot create a card instance\n");
+ dev_err(&p_dev->dev, "vxpocket: cannot create a card instance\n");
return err;
}