1
0

[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 <mchehab@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
Mauro Carvalho Chehab
2016-11-13 09:46:11 -02:00
committed by Mauro Carvalho Chehab
parent f1dc10b6e1
commit e39682b5d9
18 changed files with 209 additions and 219 deletions

View File

@@ -17,6 +17,9 @@
* GNU General Public License for more details.
*/
#include "cx23885.h"
#include "cx23885-reg.h"
#include <linux/module.h>
#include <linux/init.h>
#include <linux/device.h>
@@ -35,20 +38,14 @@
#include <sound/tlv.h>
#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;