All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: alsa-devel@alsa-project.org
Subject: [PATCH 32/48] ALSA: emu10k1x: Use standard printk helpers
Date: Wed, 26 Feb 2014 16:53:34 +0100	[thread overview]
Message-ID: <1393430030-26704-33-git-send-email-tiwai@suse.de> (raw)
In-Reply-To: <1393430030-26704-1-git-send-email-tiwai@suse.de>

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/pci/emu10k1/emu10k1x.c | 27 ++++++++++++++++++---------
 1 file changed, 18 insertions(+), 9 deletions(-)

diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c
index 3988eaa778cf..efe017526977 100644
--- a/sound/pci/emu10k1/emu10k1x.c
+++ b/sound/pci/emu10k1/emu10k1x.c
@@ -369,7 +369,8 @@ static void snd_emu10k1x_pcm_interrupt(struct emu10k1x *emu, struct emu10k1x_voi
 	if (epcm->substream == NULL)
 		return;
 #if 0
-	snd_printk(KERN_INFO "IRQ: position = 0x%x, period = 0x%x, size = 0x%x\n",
+	dev_info(emu->card->dev,
+		 "IRQ: position = 0x%x, period = 0x%x, size = 0x%x\n",
 		   epcm->substream->ops->pointer(epcm->substream),
 		   snd_pcm_lib_period_bytes(epcm->substream),
 		   snd_pcm_lib_buffer_bytes(epcm->substream));
@@ -487,7 +488,11 @@ static int snd_emu10k1x_pcm_trigger(struct snd_pcm_substream *substream,
 	int channel = epcm->voice->number;
 	int result = 0;
 
-//	snd_printk(KERN_INFO "trigger - emu10k1x = 0x%x, cmd = %i, pointer = %d\n", (int)emu, cmd, (int)substream->ops->pointer(substream));
+	/*
+	dev_dbg(emu->card->dev,
+		"trigger - emu10k1x = 0x%x, cmd = %i, pointer = %d\n",
+		(int)emu, cmd, (int)substream->ops->pointer(substream));
+	*/
 
 	switch (cmd) {
 	case SNDRV_PCM_TRIGGER_START:
@@ -826,7 +831,7 @@ static irqreturn_t snd_emu10k1x_interrupt(int irq, void *dev_id)
 	// acknowledge the interrupt if necessary
 	outl(status, chip->port + IPR);
 
-	// snd_printk(KERN_INFO "interrupt %08x\n", status);
+	/* dev_dbg(chip->card->dev, "interrupt %08x\n", status); */
 	return IRQ_HANDLED;
 }
 
@@ -919,7 +924,7 @@ static int snd_emu10k1x_create(struct snd_card *card,
 		return err;
 	if (pci_set_dma_mask(pci, DMA_BIT_MASK(28)) < 0 ||
 	    pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(28)) < 0) {
-		snd_printk(KERN_ERR "error to set 28bit mask DMA\n");
+		dev_err(card->dev, "error to set 28bit mask DMA\n");
 		pci_disable_device(pci);
 		return -ENXIO;
 	}
@@ -940,14 +945,15 @@ static int snd_emu10k1x_create(struct snd_card *card,
 	chip->port = pci_resource_start(pci, 0);
 	if ((chip->res_port = request_region(chip->port, 8,
 					     "EMU10K1X")) == NULL) { 
-		snd_printk(KERN_ERR "emu10k1x: cannot allocate the port 0x%lx\n", chip->port);
+		dev_err(card->dev, "cannot allocate the port 0x%lx\n",
+			chip->port);
 		snd_emu10k1x_free(chip);
 		return -EBUSY;
 	}
 
 	if (request_irq(pci->irq, snd_emu10k1x_interrupt,
 			IRQF_SHARED, KBUILD_MODNAME, chip)) {
-		snd_printk(KERN_ERR "emu10k1x: cannot grab irq %d\n", pci->irq);
+		dev_err(card->dev, "cannot grab irq %d\n", pci->irq);
 		snd_emu10k1x_free(chip);
 		return -EBUSY;
 	}
@@ -964,7 +970,7 @@ static int snd_emu10k1x_create(struct snd_card *card,
 	chip->revision = pci->revision;
 	pci_read_config_dword(pci, PCI_SUBSYSTEM_VENDOR_ID, &chip->serial);
 	pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &chip->model);
-	snd_printk(KERN_INFO "Model %04x Rev %08x Serial %08x\n", chip->model,
+	dev_info(card->dev, "Model %04x Rev %08x Serial %08x\n", chip->model,
 		   chip->revision, chip->serial);
 
 	outl(0, chip->port + INTE);	
@@ -1248,7 +1254,9 @@ static void mpu401_clear_rx(struct emu10k1x *emu, struct emu10k1x_midi *mpu)
 		mpu401_read_data(emu, mpu);
 #ifdef CONFIG_SND_DEBUG
 	if (timeout <= 0)
-		snd_printk(KERN_ERR "cmd: clear rx timeout (status = 0x%x)\n", mpu401_read_stat(emu, mpu));
+		dev_err(emu->card->dev,
+			"cmd: clear rx timeout (status = 0x%x)\n",
+			mpu401_read_stat(emu, mpu));
 #endif
 }
 
@@ -1322,7 +1330,8 @@ static int snd_emu10k1x_midi_cmd(struct emu10k1x * emu,
 	}
 	spin_unlock_irqrestore(&midi->input_lock, flags);
 	if (!ok) {
-		snd_printk(KERN_ERR "midi_cmd: 0x%x failed at 0x%lx (status = 0x%x, data = 0x%x)!!!\n",
+		dev_err(emu->card->dev,
+			"midi_cmd: 0x%x failed at 0x%lx (status = 0x%x, data = 0x%x)!!!\n",
 			   cmd, emu->port,
 			   mpu401_read_stat(emu, midi),
 			   mpu401_read_data(emu, midi));
-- 
1.9.0

  parent reply	other threads:[~2014-02-26 15:53 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-26 15:53 [PATCH 00/48] Rewrite kernel messages with standard printk helpers Takashi Iwai
2014-02-26 15:53 ` [PATCH 01/48] ALSA: ad1889: Use " Takashi Iwai
2014-02-26 15:53 ` [PATCH 02/48] ALSA: als300: Remove function debug prints Takashi Iwai
2014-02-26 15:53 ` [PATCH 03/48] ALSA: als300: Use standard printk helpers Takashi Iwai
2014-02-26 15:53 ` [PATCH 04/48] ALSA: als4000: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 05/48] ALSA: atiixp: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 06/48] ALSA: atiixp-modem: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 07/48] ALSA: azt3328: Remove function debug prints Takashi Iwai
2014-02-26 15:53 ` [PATCH 08/48] ALSA: azt3328: Use standard printk helpers Takashi Iwai
2014-02-26 15:53 ` [PATCH 09/48] ALSA: bt87x: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 10/48] ALSA: cmipci: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 11/48] ALSA: cs4281: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 12/48] ALSA: cs5530: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 13/48] ALSA: ens137x: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 14/48] ALSA: es1938: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 15/48] ALSA: es1968: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 16/48] ALSA: fm801: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 17/48] ALSA: intel8x0: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 18/48] ALSA: intel8x0m: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 19/48] ALSA: maestro3: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 20/48] ALSA: rme32: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 21/48] ALSA: rme96: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 22/48] ALSA: sonicvibes: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 23/48] ALSA: via82xx: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 24/48] ALSA: via82xx_modem: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 25/48] ALSA: ac97: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 26/48] ALSA: ali5451: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 27/48] ALSA: aw2: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 28/48] ALSA: ca0106: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 29/48] ALSA: cs5535audio: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 30/48] ALSA: cs46xx: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 31/48] ALSA: echoaudio: " Takashi Iwai
2014-02-26 15:53 ` Takashi Iwai [this message]
2014-02-26 15:53 ` [PATCH 33/48] ALSA: emu10k1: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 34/48] ALSA: ice17xx: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 35/48] ALSA: lola: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 36/48] ALSA: lx6464es: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 37/48] ALSA: mixart: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 38/48] ALSA: nm256: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 39/48] ALSA: oxygen: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 40/48] ALSA: pcxhr: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 41/48] ALSA: hdsp: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 42/48] ALSA: hdspm: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 43/48] ALSA: rme9652: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 44/48] ALSA: trident: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 45/48] ALSA: vx222: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 46/48] ALSA: ymfpci: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 47/48] ALSA: usb-audio: " Takashi Iwai
2014-02-26 15:53 ` [PATCH 48/48] ALSA: 6fire: " Takashi Iwai
2014-02-26 16:39   ` Takashi Iwai
     [not found] ` <CAN8cciZQS1XK4aGt6at_gRhMM1Mtp0sFqs80ZKwFHP_YXwHdjg@mail.gmail.com>
2014-02-27  7:40   ` [PATCH 00/48] Rewrite kernel messages with " Takashi Iwai
2014-02-27  8:00     ` Raymond Yau
2014-02-27  8:10       ` Takashi Iwai
2014-02-27 10:43         ` Takashi Iwai
2014-02-27 12:15         ` Raymond Yau
2014-02-27 13:18           ` Takashi Iwai
2014-02-28  3:15     ` Raymond Yau
2014-02-28  6:28       ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1393430030-26704-33-git-send-email-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.