summaryrefslogtreecommitdiff
path: root/drivers/media/pci/cx23885/cx23885-alsa.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-11-13 09:46:11 -0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-11-18 08:09:36 -0200
commite39682b5d96ae7a33a0f6b5578911913be8f14b6 (patch)
treeb7aa9b903756aca9e874e132e0a604e307ef71b0 /drivers/media/pci/cx23885/cx23885-alsa.c
parentf1dc10b6e18df849429c1625bbcdf04ecc25d5c3 (diff)
[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>
Diffstat (limited to 'drivers/media/pci/cx23885/cx23885-alsa.c')
-rw-r--r--drivers/media/pci/cx23885/cx23885-alsa.c21
1 files changed, 9 insertions, 12 deletions
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 <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;