diff options
author | Joe Perches <joe@perches.com> | 2010-11-07 20:48:21 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-12-29 10:16:46 (GMT) |
commit | 36d89f7de4a4937848de86d9b35cb03a9f0357e1 (patch) | |
tree | 38d40406de7fe081febb1f6394f308a6037c0c67 /drivers/staging/cx25821/cx25821-video.c | |
parent | 13d28e4917fb6cf6898e8998f01ab83b3f468aeb (diff) | |
download | linux-fsl-qoriq-36d89f7de4a4937848de86d9b35cb03a9f0357e1.tar.xz |
[media] drivers/staging/cx25821: Use pr_fmt and pr_<level>
Fix several defects with bad line continuation uses that
introduce whitespace.
Fix several defects with lines missing "\n".
Standardize prefixes via pr_fmt.
Remove internal cx25821 prefixes.
Standardize :%s():" ... __func__ uses.
Coalesce long formats.
Add KERN_<level> prefixes via pr_<level> to printks.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/staging/cx25821/cx25821-video.c')
-rw-r--r-- | drivers/staging/cx25821/cx25821-video.c | 82 |
1 files changed, 38 insertions, 44 deletions
diff --git a/drivers/staging/cx25821/cx25821-video.c b/drivers/staging/cx25821/cx25821-video.c index 5238930..3c121fc 100644 --- a/drivers/staging/cx25821/cx25821-video.c +++ b/drivers/staging/cx25821/cx25821-video.c @@ -24,6 +24,8 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include "cx25821-video.h" MODULE_DESCRIPTION("v4l2 driver module for cx25821 based TV cards"); @@ -104,7 +106,7 @@ struct cx25821_fmt *cx25821_format_by_fourcc(unsigned int fourcc) if (formats[i].fourcc == fourcc) return formats + i; - printk(KERN_ERR "%s(0x%08x) NOT FOUND\n", __func__, fourcc); + pr_err("%s(0x%08x) NOT FOUND\n", __func__, fourcc); return NULL; } @@ -159,15 +161,15 @@ void cx25821_video_wakeup(struct cx25821_dev *dev, struct cx25821_dmaqueue *q, else mod_timer(&q->timeout, jiffies + BUFFER_TIMEOUT); if (bc != 1) - printk(KERN_ERR "%s: %d buffers handled (should be 1)\n", + pr_err("%s: %d buffers handled (should be 1)\n", __func__, bc); } #ifdef TUNER_FLAG int cx25821_set_tvnorm(struct cx25821_dev *dev, v4l2_std_id norm) { - dprintk(1, "%s(norm = 0x%08x) name: [%s]\n", __func__, - (unsigned int)norm, v4l2_norm_to_name(norm)); + dprintk(1, "%s(norm = 0x%08x) name: [%s]\n", + __func__, (unsigned int)norm, v4l2_norm_to_name(norm)); dev->tvnorm = norm; @@ -267,7 +269,7 @@ int cx25821_video_mux(struct cx25821_dev *dev, unsigned int input) struct v4l2_routing route; memset(&route, 0, sizeof(route)); - dprintk(1, "%s() video_mux: %d [vmux=%d, gpio=0x%x,0x%x,0x%x,0x%x]\n", + dprintk(1, "%s(): video_mux: %d [vmux=%d, gpio=0x%x,0x%x,0x%x,0x%x]\n", __func__, input, INPUT(input)->vmux, INPUT(input)->gpio0, INPUT(input)->gpio1, INPUT(input)->gpio2, INPUT(input)->gpio3); dev->input = input; @@ -400,8 +402,8 @@ int cx25821_video_irq(struct cx25821_dev *dev, int chan_num, u32 status) /* risc op code error */ if (status & (1 << 16)) { - printk(KERN_WARNING "%s, %s: video risc op code error\n", - dev->name, channel->name); + pr_warn("%s, %s: video risc op code error\n", + dev->name, channel->name); cx_clear(channel->dma_ctl, 0x11); cx25821_sram_channel_dump(dev, channel); } @@ -458,7 +460,7 @@ void cx25821_video_unregister(struct cx25821_dev *dev, int chan_num) btcx_riscmem_free(dev->pci, &dev->channels[chan_num].vidq.stopper); - printk(KERN_WARNING "device %d released!\n", chan_num); + pr_warn("device %d released!\n", chan_num); } } @@ -590,7 +592,7 @@ int cx25821_buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb, init_buffer = 1; rc = videobuf_iolock(q, &buf->vb, NULL); if (0 != rc) { - printk(KERN_DEBUG "videobuf_iolock failed!\n"); + printk(KERN_DEBUG pr_fmt("videobuf_iolock failed!\n")); goto fail; } } @@ -1038,8 +1040,8 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv, dev->channels[fh->channel_id].cif_width = fh->width; medusa_set_resolution(dev, fh->width, SRAM_CH00); - dprintk(2, "%s() width=%d height=%d field=%d\n", __func__, fh->width, - fh->height, fh->vidq.field); + dprintk(2, "%s(): width=%d height=%d field=%d\n", __func__, fh->width, + fh->height, fh->vidq.field); v4l2_fill_mbus_format(&mbus_fmt, &f->fmt.pix, V4L2_MBUS_FMT_FIXED); cx25821_call_all(dev, video, s_mbus_fmt, &mbus_fmt); @@ -1070,14 +1072,14 @@ static int vidioc_log_status(struct file *file, void *priv) u32 tmp = 0; snprintf(name, sizeof(name), "%s/2", dev->name); - printk(KERN_INFO "%s/2: ============ START LOG STATUS ============\n", - dev->name); + pr_info("%s/2: ============ START LOG STATUS ============\n", + dev->name); cx25821_call_all(dev, core, log_status); tmp = cx_read(sram_ch->dma_ctl); - printk(KERN_INFO "Video input 0 is %s\n", - (tmp & 0x11) ? "streaming" : "stopped"); - printk(KERN_INFO "%s/2: ============= END LOG STATUS =============\n", - dev->name); + pr_info("Video input 0 is %s\n", + (tmp & 0x11) ? "streaming" : "stopped"); + pr_info("%s/2: ============= END LOG STATUS =============\n", + dev->name); return 0; } @@ -1319,7 +1321,7 @@ int cx25821_vidioc_g_input(struct file *file, void *priv, unsigned int *i) struct cx25821_dev *dev = ((struct cx25821_fh *)priv)->dev; *i = dev->input; - dprintk(1, "%s() returns %d\n", __func__, *i); + dprintk(1, "%s(): returns %d\n", __func__, *i); return 0; } @@ -1339,7 +1341,7 @@ int cx25821_vidioc_s_input(struct file *file, void *priv, unsigned int i) } if (i > 2) { - dprintk(1, "%s() -EINVAL\n", __func__); + dprintk(1, "%s(): -EINVAL\n", __func__); return -EINVAL; } @@ -1390,7 +1392,7 @@ int cx25821_vidioc_s_frequency(struct file *file, void *priv, struct v4l2_freque if (0 != err) return err; } else { - printk(KERN_ERR "Invalid fh pointer!\n"); + pr_err("Invalid fh pointer!\n"); return -EINVAL; } @@ -1733,12 +1735,10 @@ static long video_ioctl_upstream9(struct file *file, unsigned int cmd, data_from_user = (struct upstream_user_struct *)arg; - if (!data_from_user) { - printk - ("cx25821 in %s(): Upstream data is INVALID. Returning.\n", - __func__); - return 0; - } + if (!data_from_user) { + pr_err("%s(): Upstream data is INVALID. Returning\n", __func__); + return 0; + } command = data_from_user->command; @@ -1776,12 +1776,10 @@ static long video_ioctl_upstream10(struct file *file, unsigned int cmd, data_from_user = (struct upstream_user_struct *)arg; - if (!data_from_user) { - printk - ("cx25821 in %s(): Upstream data is INVALID. Returning.\n", - __func__); - return 0; - } + if (!data_from_user) { + pr_err("%s(): Upstream data is INVALID. Returning\n", __func__); + return 0; + } command = data_from_user->command; @@ -1819,12 +1817,10 @@ static long video_ioctl_upstream11(struct file *file, unsigned int cmd, data_from_user = (struct upstream_user_struct *)arg; - if (!data_from_user) { - printk - ("cx25821 in %s(): Upstream data is INVALID. Returning.\n", - __func__); - return 0; - } + if (!data_from_user) { + pr_err("%s(): Upstream data is INVALID. Returning\n", __func__); + return 0; + } command = data_from_user->command; @@ -1866,12 +1862,10 @@ static long video_ioctl_set(struct file *file, unsigned int cmd, data_from_user = (struct downstream_user_struct *)arg; - if (!data_from_user) { - printk( - "cx25821 in %s(): User data is INVALID. Returning.\n", - __func__); - return 0; - } + if (!data_from_user) { + pr_err("%s(): User data is INVALID. Returning\n", __func__); + return 0; + } command = data_from_user->command; |