diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-11-01 11:59:03 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-11-03 17:56:22 (GMT) |
commit | ed0e3729c9d790d17688083f070da3674088ea9c (patch) | |
tree | f6c25942baa88ded9a68c446d662fb8e338f40de /drivers/media/usb/cx231xx/cx231xx-audio.c | |
parent | 88538bb5449caef8347a2785f7ac32c0b8d5858c (diff) | |
download | linux-ed0e3729c9d790d17688083f070da3674088ea9c.tar.xz |
[media] cx231xx: Cleanup printk at the driver
There are lots of debug printks printed with pr_info. Also, the
printk's data are not too coherent:
- there are duplicated driver name at the print format;
- function name format string differs from function to function;
- long strings broken into multiple lines;
- some printks just produce ugly reports, being almost useless
as-is.
Do a cleanup on that.
Still, there are much to be done in order to do a better printk
job on this driver, but, at least it will now be a way less
verbose, if debug printks are disabled, and some logs might
actually be useful.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/usb/cx231xx/cx231xx-audio.c')
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-audio.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/media/usb/cx231xx/cx231xx-audio.c b/drivers/media/usb/cx231xx/cx231xx-audio.c index 8312388..e967031 100644 --- a/drivers/media/usb/cx231xx/cx231xx-audio.c +++ b/drivers/media/usb/cx231xx/cx231xx-audio.c @@ -277,7 +277,7 @@ static int cx231xx_init_audio_isoc(struct cx231xx *dev) int i, errCode; int sb_size; - pr_info("%s: Starting ISO AUDIO transfers\n", __func__); + pr_debug("%s: Starting ISO AUDIO transfers\n", __func__); if (dev->state & DEV_DISCONNECTED) return -ENODEV; @@ -338,7 +338,7 @@ static int cx231xx_init_audio_bulk(struct cx231xx *dev) int i, errCode; int sb_size; - pr_info("%s: Starting BULK AUDIO transfers\n", __func__); + pr_debug("%s: Starting BULK AUDIO transfers\n", __func__); if (dev->state & DEV_DISCONNECTED) return -ENODEV; @@ -439,8 +439,7 @@ static int snd_cx231xx_capture_open(struct snd_pcm_substream *substream) dprintk("opening device and trying to acquire exclusive lock\n"); if (!dev) { - pr_err("BUG: cx231xx can't find device struct." - " Can't proceed with open\n"); + pr_err("BUG: cx231xx can't find device struct. Can't proceed with open\n"); return -ENODEV; } @@ -662,8 +661,7 @@ static int cx231xx_audio_init(struct cx231xx *dev) return 0; } - pr_info("cx231xx-audio.c: probing for cx231xx " - "non standard usbaudio\n"); + pr_debug("probing for cx231xx non standard usbaudio\n"); err = snd_card_new(&dev->udev->dev, index[devnr], "Cx231xx Audio", THIS_MODULE, 0, &card); @@ -707,14 +705,12 @@ static int cx231xx_audio_init(struct cx231xx *dev) bEndpointAddress; adev->num_alt = uif->num_altsetting; - pr_info("EndPoint Addr 0x%x, Alternate settings: %i\n", - adev->end_point_addr, adev->num_alt); + pr_info("audio EndPoint Addr 0x%x, Alternate settings: %i\n", + adev->end_point_addr, adev->num_alt); adev->alt_max_pkt_size = kmalloc(32 * adev->num_alt, GFP_KERNEL); - if (adev->alt_max_pkt_size == NULL) { - pr_err("out of memory!\n"); + if (adev->alt_max_pkt_size == NULL) return -ENOMEM; - } for (i = 0; i < adev->num_alt; i++) { u16 tmp = @@ -722,7 +718,7 @@ static int cx231xx_audio_init(struct cx231xx *dev) wMaxPacketSize); adev->alt_max_pkt_size[i] = (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1); - pr_info("Alternate setting %i, max size= %i\n", i, + pr_debug("audio alternate setting %i, max size= %i\n", i, adev->alt_max_pkt_size[i]); } |