From patchwork Wed Feb 26 15:53:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 3725861 X-Patchwork-Delegate: tiwai@suse.de Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DEC4EBF13A for ; Wed, 26 Feb 2014 16:20:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 12D92201D3 for ; Wed, 26 Feb 2014 16:20:38 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id BD85F2018E for ; Wed, 26 Feb 2014 16:20:36 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id C05052658FA; Wed, 26 Feb 2014 17:20:31 +0100 (CET) Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 721322658FC; Wed, 26 Feb 2014 16:55:00 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 618722658D5; Wed, 26 Feb 2014 16:54:52 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 5FE452657E5 for ; Wed, 26 Feb 2014 16:53:54 +0100 (CET) Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 03D0B7502A for ; Wed, 26 Feb 2014 15:53:54 +0000 (UTC) From: Takashi Iwai To: alsa-devel@alsa-project.org Date: Wed, 26 Feb 2014 16:53:45 +0100 Message-Id: <1393430030-26704-44-git-send-email-tiwai@suse.de> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1393430030-26704-1-git-send-email-tiwai@suse.de> References: <1393430030-26704-1-git-send-email-tiwai@suse.de> Subject: [alsa-devel] [PATCH 43/48] ALSA: rme9652: Use standard printk helpers X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Convert with dev_err() and co from snd_printk(), etc. Signed-off-by: Takashi Iwai --- sound/pci/rme9652/rme9652.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/sound/pci/rme9652/rme9652.c b/sound/pci/rme9652/rme9652.c index a62d6e13d8ce..1d9be90f7748 100644 --- a/sound/pci/rme9652/rme9652.c +++ b/sound/pci/rme9652/rme9652.c @@ -394,7 +394,9 @@ static snd_pcm_uframes_t rme9652_hw_pointer(struct snd_rme9652 *rme9652) if (offset < period_size) { if (offset > rme9652->max_jitter) { if (frag) - printk(KERN_ERR "Unexpected hw_pointer position (bufid == 0): status: %x offset: %d\n", status, offset); + dev_err(rme9652->card->dev, + "Unexpected hw_pointer position (bufid == 0): status: %x offset: %d\n", + status, offset); } else if (!frag) return 0; offset -= rme9652->max_jitter; @@ -403,7 +405,9 @@ static snd_pcm_uframes_t rme9652_hw_pointer(struct snd_rme9652 *rme9652) } else { if (offset > period_size + rme9652->max_jitter) { if (!frag) - printk(KERN_ERR "Unexpected hw_pointer position (bufid == 1): status: %x offset: %d\n", status, offset); + dev_err(rme9652->card->dev, + "Unexpected hw_pointer position (bufid == 1): status: %x offset: %d\n", + status, offset); } else if (frag) return period_size; offset -= rme9652->max_jitter; @@ -769,7 +773,8 @@ static inline int rme9652_spdif_sample_rate(struct snd_rme9652 *s) break; default: - snd_printk(KERN_ERR "%s: unknown S/PDIF input rate (bits = 0x%x)\n", + dev_err(s->card->dev, + "%s: unknown S/PDIF input rate (bits = 0x%x)\n", s->card_name, rate_bits); return 0; break; @@ -1790,7 +1795,8 @@ static int snd_rme9652_initialize_memory(struct snd_rme9652 *rme9652) snd_hammerfall_get_buffer(rme9652->pci, &rme9652->playback_dma_buf, RME9652_DMA_AREA_BYTES) < 0) { if (rme9652->capture_dma_buf.area) snd_dma_free_pages(&rme9652->capture_dma_buf); - printk(KERN_ERR "%s: no buffers available\n", rme9652->card_name); + dev_err(rme9652->card->dev, + "%s: no buffers available\n", rme9652->card_name); return -ENOMEM; } @@ -2468,13 +2474,14 @@ static int snd_rme9652_create(struct snd_card *card, rme9652->port = pci_resource_start(pci, 0); rme9652->iobase = ioremap_nocache(rme9652->port, RME9652_IO_EXTENT); if (rme9652->iobase == NULL) { - snd_printk(KERN_ERR "unable to remap region 0x%lx-0x%lx\n", rme9652->port, rme9652->port + RME9652_IO_EXTENT - 1); + dev_err(card->dev, "unable to remap region 0x%lx-0x%lx\n", + rme9652->port, rme9652->port + RME9652_IO_EXTENT - 1); return -EBUSY; } if (request_irq(pci->irq, snd_rme9652_interrupt, IRQF_SHARED, KBUILD_MODNAME, rme9652)) { - snd_printk(KERN_ERR "unable to request IRQ %d\n", pci->irq); + dev_err(card->dev, "unable to request IRQ %d\n", pci->irq); return -EBUSY; } rme9652->irq = pci->irq;