diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-11-24 09:52:34 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-01-31 14:31:09 -0200 |
commit | f57e9618738da2ec562adf2dc312070b7b9a0dec (patch) | |
tree | 8b59b986affe66ffac60627b6996d96963e4e845 /drivers/media/pci/ivtv/ivtv-alsa-main.c | |
parent | bbdba43f202bcd724063524aef1436459af0e5ec (diff) |
[media] ivtv: use pr_foo() instead of calling printk() directly
pr_foo() provides a convenient way for printk's, enforcing
that they'll all prepend the error message with the driver's
name.
Use it inside ivtv.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/pci/ivtv/ivtv-alsa-main.c')
-rw-r--r-- | drivers/media/pci/ivtv/ivtv-alsa-main.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/media/pci/ivtv/ivtv-alsa-main.c b/drivers/media/pci/ivtv/ivtv-alsa-main.c index f57f3cc30c3f..029f52733f70 100644 --- a/drivers/media/pci/ivtv/ivtv-alsa-main.c +++ b/drivers/media/pci/ivtv/ivtv-alsa-main.c @@ -29,10 +29,11 @@ int ivtv_alsa_debug; static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; -#define IVTV_DEBUG_ALSA_INFO(fmt, arg...) \ +#define IVTV_DEBUG_ALSA_INFO(__fmt, __arg...) \ do { \ if (ivtv_alsa_debug & 2) \ - pr_info("%s: " fmt, "ivtv-alsa", ## arg); \ + printk(KERN_INFO pr_fmt("%s: alsa:" __fmt), \ + __func__, ##__arg); \ } while (0) module_param_named(debug, ivtv_alsa_debug, int, 0644); @@ -221,8 +222,7 @@ static int ivtv_alsa_load(struct ivtv *itv) s = &itv->streams[IVTV_ENC_STREAM_TYPE_PCM]; if (s->vdev.v4l2_dev == NULL) { - IVTV_DEBUG_ALSA_INFO("%s: PCM stream for card is disabled - skipping\n", - __func__); + IVTV_DEBUG_ALSA_INFO("PCM stream for card is disabled - skipping\n"); return 0; } @@ -236,8 +236,7 @@ static int ivtv_alsa_load(struct ivtv *itv) IVTV_ALSA_ERR("%s: failed to create struct snd_ivtv_card\n", __func__); } else { - IVTV_DEBUG_ALSA_INFO("%s: created ivtv ALSA interface instance \n", - __func__); + IVTV_DEBUG_ALSA_INFO("created ivtv ALSA interface instance\n"); } return 0; } |