From e39682b5d96ae7a33a0f6b5578911913be8f14b6 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 13 Nov 2016 09:46:11 -0200 Subject: [media] cx23885: convert it to use pr_foo() macros Instead of calling printk() directly, use pr_foo() macros, as suggested at the Kernel's coding style. Please notice that a conversion to dev_foo() is not trivial, as several parts on this driver uses pr_cont(). Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- drivers/media/pci/cx23885/cx23885-alsa.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'drivers/media/pci/cx23885/cx23885-alsa.c') diff --git a/drivers/media/pci/cx23885/cx23885-alsa.c b/drivers/media/pci/cx23885/cx23885-alsa.c index 9d2a4e2dc54f..c148f9a4a9ac 100644 --- a/drivers/media/pci/cx23885/cx23885-alsa.c +++ b/drivers/media/pci/cx23885/cx23885-alsa.c @@ -17,6 +17,9 @@ * GNU General Public License for more details. */ +#include "cx23885.h" +#include "cx23885-reg.h" + #include #include #include @@ -35,20 +38,14 @@ #include - -#include "cx23885.h" -#include "cx23885-reg.h" - #define AUDIO_SRAM_CHANNEL SRAM_CH07 #define dprintk(level, fmt, arg...) do { \ if (audio_debug + 1 > level) \ - printk(KERN_INFO "%s: " fmt, chip->dev->name , ## arg); \ + printk(KERN_DEBUG pr_fmt("%s: alsa: " fmt), \ + chip->dev->name, ##arg); \ } while(0) -#define dprintk_core(level, fmt, arg...) if (audio_debug >= level) \ - printk(KERN_DEBUG "%s: " fmt, chip->dev->name , ## arg) - /**************************************************************************** Module global static vars ****************************************************************************/ @@ -247,7 +244,7 @@ int cx23885_audio_irq(struct cx23885_dev *dev, u32 status, u32 mask) /* risc op code error */ if (status & AUD_INT_OPC_ERR) { - printk(KERN_WARNING "%s/1: Audio risc op code error\n", + pr_warn("%s/1: Audio risc op code error\n", dev->name); cx_clear(AUD_INT_DMA_CTL, 0x11); cx23885_sram_channel_dump(dev, @@ -327,7 +324,7 @@ static int snd_cx23885_pcm_open(struct snd_pcm_substream *substream) int err; if (!chip) { - printk(KERN_ERR "BUG: cx23885 can't find device struct. Can't proceed with open\n"); + pr_err("BUG: cx23885 can't find device struct. Can't proceed with open\n"); return -ENODEV; } @@ -554,7 +551,7 @@ struct cx23885_audio_dev *cx23885_audio_register(struct cx23885_dev *dev) return NULL; if (dev->sram_channels[AUDIO_SRAM_CHANNEL].cmds_start == 0) { - printk(KERN_WARNING "%s(): Missing SRAM channel configuration for analog TV Audio\n", + pr_warn("%s(): Missing SRAM channel configuration for analog TV Audio\n", __func__); return NULL; } @@ -589,7 +586,7 @@ struct cx23885_audio_dev *cx23885_audio_register(struct cx23885_dev *dev) error: snd_card_free(card); - printk(KERN_ERR "%s(): Failed to register analog audio adapter\n", + pr_err("%s(): Failed to register analog audio adapter\n", __func__); return NULL; -- cgit v1.2.3