Pure CodingStyle fixes.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
                if (lanes->data[i].pos == 0)
                        continue;
 
-               if (lanes->data[i].pol > 1 || lanes->data[i].pos > (csi2->phy->max_data_lanes + 1))
+               if (lanes->data[i].pol > 1 ||
+                   lanes->data[i].pos > (csi2->phy->max_data_lanes + 1))
                        return -EINVAL;
 
                if (used_lanes & (1 << lanes->data[i].pos))
                csi2->phy->used_data_lanes++;
        }
 
-       if (lanes->clk.pol > 1 || lanes->clk.pos > (csi2->phy->max_data_lanes + 1))
+       if (lanes->clk.pol > 1 ||
+           lanes->clk.pos > (csi2->phy->max_data_lanes + 1))
                return -EINVAL;
 
        if (lanes->clk.pos == 0 || used_lanes & (1 << lanes->clk.pos))
 
 #include "iss_regs.h"
 #include "iss_ipipeif.h"
 
-static struct v4l2_mbus_framefmt *
-__ipipeif_get_format(struct iss_ipipeif_device *ipipeif, struct v4l2_subdev_fh *fh,
-                 unsigned int pad, enum v4l2_subdev_format_whence which);
-
 static const unsigned int ipipeif_fmts[] = {
        V4L2_MBUS_FMT_SGRBG10_1X10,
        V4L2_MBUS_FMT_SRGGB10_1X10,
  */
 void omap4iss_ipipeif_isr(struct iss_ipipeif_device *ipipeif, u32 events)
 {
-       if (omap4iss_module_sync_is_stopping(&ipipeif->wait, &ipipeif->stopping))
+       if (omap4iss_module_sync_is_stopping(&ipipeif->wait,
+                                            &ipipeif->stopping))
                return;
 
        if (events & ISP5_IRQ_ISIF0)
  * ISP video operations
  */
 
-static int ipipeif_video_queue(struct iss_video *video, struct iss_buffer *buffer)
+static int ipipeif_video_queue(struct iss_video *video,
+                              struct iss_buffer *buffer)
 {
        struct iss_ipipeif_device *ipipeif = container_of(video,
                                struct iss_ipipeif_device, video_out);
 }
 
 static struct v4l2_mbus_framefmt *
-__ipipeif_get_format(struct iss_ipipeif_device *ipipeif, struct v4l2_subdev_fh *fh,
-                 unsigned int pad, enum v4l2_subdev_format_whence which)
+__ipipeif_get_format(struct iss_ipipeif_device *ipipeif,
+                    struct v4l2_subdev_fh *fh, unsigned int pad,
+                    enum v4l2_subdev_format_whence which)
 {
        if (which == V4L2_SUBDEV_FORMAT_TRY)
                return v4l2_subdev_get_try_format(fh, pad);
  * @fmt: Format
  */
 static void
-ipipeif_try_format(struct iss_ipipeif_device *ipipeif, struct v4l2_subdev_fh *fh,
-               unsigned int pad, struct v4l2_mbus_framefmt *fmt,
-               enum v4l2_subdev_format_whence which)
+ipipeif_try_format(struct iss_ipipeif_device *ipipeif,
+                  struct v4l2_subdev_fh *fh, unsigned int pad,
+                  struct v4l2_mbus_framefmt *fmt,
+                  enum v4l2_subdev_format_whence which)
 {
        struct v4l2_mbus_framefmt *format;
        unsigned int width = fmt->width;
 
        switch (pad) {
        case IPIPEIF_PAD_SINK:
-               /* TODO: If the IPIPEIF output formatter pad is connected directly
-                * to the resizer, only YUV formats can be used.
+               /* TODO: If the IPIPEIF output formatter pad is connected
+                * directly to the resizer, only YUV formats can be used.
                 */
                for (i = 0; i < ARRAY_SIZE(ipipeif_fmts); i++) {
                        if (fmt->code == ipipeif_fmts[i])
                break;
 
        case IPIPEIF_PAD_SOURCE_ISIF_SF:
-               format = __ipipeif_get_format(ipipeif, fh, IPIPEIF_PAD_SINK, which);
+               format = __ipipeif_get_format(ipipeif, fh, IPIPEIF_PAD_SINK,
+                                             which);
                memcpy(fmt, format, sizeof(*fmt));
 
                /* The data formatter truncates the number of horizontal output
                break;
 
        case IPIPEIF_PAD_SOURCE_VP:
-               format = __ipipeif_get_format(ipipeif, fh, IPIPEIF_PAD_SINK, which);
+               format = __ipipeif_get_format(ipipeif, fh, IPIPEIF_PAD_SINK,
+                                             which);
                memcpy(fmt, format, sizeof(*fmt));
 
                fmt->width = clamp_t(u32, width, 32, fmt->width);
        format.code = fse->code;
        format.width = 1;
        format.height = 1;
-       ipipeif_try_format(ipipeif, fh, fse->pad, &format, V4L2_SUBDEV_FORMAT_TRY);
+       ipipeif_try_format(ipipeif, fh, fse->pad, &format,
+                          V4L2_SUBDEV_FORMAT_TRY);
        fse->min_width = format.width;
        fse->min_height = format.height;
 
        format.code = fse->code;
        format.width = -1;
        format.height = -1;
-       ipipeif_try_format(ipipeif, fh, fse->pad, &format, V4L2_SUBDEV_FORMAT_TRY);
+       ipipeif_try_format(ipipeif, fh, fse->pad, &format,
+                          V4L2_SUBDEV_FORMAT_TRY);
        fse->max_width = format.width;
        fse->max_height = format.height;
 
 
        /* Propagate the format from sink to source */
        if (fmt->pad == IPIPEIF_PAD_SINK) {
-               format = __ipipeif_get_format(ipipeif, fh, IPIPEIF_PAD_SOURCE_ISIF_SF,
-                                          fmt->which);
+               format = __ipipeif_get_format(ipipeif, fh,
+                                             IPIPEIF_PAD_SOURCE_ISIF_SF,
+                                             fmt->which);
                *format = fmt->format;
-               ipipeif_try_format(ipipeif, fh, IPIPEIF_PAD_SOURCE_ISIF_SF, format,
-                               fmt->which);
+               ipipeif_try_format(ipipeif, fh, IPIPEIF_PAD_SOURCE_ISIF_SF,
+                                  format, fmt->which);
 
-               format = __ipipeif_get_format(ipipeif, fh, IPIPEIF_PAD_SOURCE_VP,
-                                          fmt->which);
+               format = __ipipeif_get_format(ipipeif, fh,
+                                             IPIPEIF_PAD_SOURCE_VP,
+                                             fmt->which);
                *format = fmt->format;
                ipipeif_try_format(ipipeif, fh, IPIPEIF_PAD_SOURCE_VP, format,
                                fmt->which);
        return 0;
 }
 
-static int ipipeif_link_validate(struct v4l2_subdev *sd, struct media_link *link,
+static int ipipeif_link_validate(struct v4l2_subdev *sd,
+                                struct media_link *link,
                                 struct v4l2_subdev_format *source_fmt,
                                 struct v4l2_subdev_format *sink_fmt)
 {
  * formats are initialized on the file handle. Otherwise active formats are
  * initialized on the device.
  */
-static int ipipeif_init_formats(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
+static int ipipeif_init_formats(struct v4l2_subdev *sd,
+                               struct v4l2_subdev_fh *fh)
 {
        struct v4l2_subdev_format format;
 
                return ret;
 
        /* Connect the IPIPEIF subdev to the video node. */
-       ret = media_entity_create_link(&ipipeif->subdev.entity, IPIPEIF_PAD_SOURCE_ISIF_SF,
-                       &ipipeif->video_out.video.entity, 0, 0);
+       ret = media_entity_create_link(&ipipeif->subdev.entity,
+                                      IPIPEIF_PAD_SOURCE_ISIF_SF,
+                                      &ipipeif->video_out.video.entity, 0, 0);
        if (ret < 0)
                return ret;
 
 
 #include "iss_regs.h"
 #include "iss_resizer.h"
 
-static struct v4l2_mbus_framefmt *
-__resizer_get_format(struct iss_resizer_device *resizer, struct v4l2_subdev_fh *fh,
-                 unsigned int pad, enum v4l2_subdev_format_whence which);
-
 static const unsigned int resizer_fmts[] = {
        V4L2_MBUS_FMT_UYVY8_1X16,
        V4L2_MBUS_FMT_YUYV8_1X16,
                pipe->error = true;
        }
 
-       if (omap4iss_module_sync_is_stopping(&resizer->wait, &resizer->stopping))
+       if (omap4iss_module_sync_is_stopping(&resizer->wait,
+                                            &resizer->stopping))
                return;
 
        if (events & ISP5_IRQ_RSZ_INT_DMA)
  * ISS video operations
  */
 
-static int resizer_video_queue(struct iss_video *video, struct iss_buffer *buffer)
+static int resizer_video_queue(struct iss_video *video,
+                              struct iss_buffer *buffer)
 {
        struct iss_resizer_device *resizer = container_of(video,
                                struct iss_resizer_device, video_out);
 }
 
 static struct v4l2_mbus_framefmt *
-__resizer_get_format(struct iss_resizer_device *resizer, struct v4l2_subdev_fh *fh,
-                 unsigned int pad, enum v4l2_subdev_format_whence which)
+__resizer_get_format(struct iss_resizer_device *resizer,
+                    struct v4l2_subdev_fh *fh, unsigned int pad,
+                    enum v4l2_subdev_format_whence which)
 {
        if (which == V4L2_SUBDEV_FORMAT_TRY)
                return v4l2_subdev_get_try_format(fh, pad);
  * @fmt: Format
  */
 static void
-resizer_try_format(struct iss_resizer_device *resizer, struct v4l2_subdev_fh *fh,
-               unsigned int pad, struct v4l2_mbus_framefmt *fmt,
-               enum v4l2_subdev_format_whence which)
+resizer_try_format(struct iss_resizer_device *resizer,
+                  struct v4l2_subdev_fh *fh, unsigned int pad,
+                  struct v4l2_mbus_framefmt *fmt,
+                  enum v4l2_subdev_format_whence which)
 {
        enum v4l2_mbus_pixelcode pixelcode;
        struct v4l2_mbus_framefmt *format;
 
        case RESIZER_PAD_SOURCE_MEM:
                pixelcode = fmt->code;
-               format = __resizer_get_format(resizer, fh, RESIZER_PAD_SINK, which);
+               format = __resizer_get_format(resizer, fh, RESIZER_PAD_SINK,
+                                             which);
                memcpy(fmt, format, sizeof(*fmt));
 
                if ((pixelcode == V4L2_MBUS_FMT_YUYV8_1_5X8) &&
        format.code = fse->code;
        format.width = 1;
        format.height = 1;
-       resizer_try_format(resizer, fh, fse->pad, &format, V4L2_SUBDEV_FORMAT_TRY);
+       resizer_try_format(resizer, fh, fse->pad, &format,
+                          V4L2_SUBDEV_FORMAT_TRY);
        fse->min_width = format.width;
        fse->min_height = format.height;
 
        format.code = fse->code;
        format.width = -1;
        format.height = -1;
-       resizer_try_format(resizer, fh, fse->pad, &format, V4L2_SUBDEV_FORMAT_TRY);
+       resizer_try_format(resizer, fh, fse->pad, &format,
+                          V4L2_SUBDEV_FORMAT_TRY);
        fse->max_width = format.width;
        fse->max_height = format.height;
 
 
        /* Propagate the format from sink to source */
        if (fmt->pad == RESIZER_PAD_SINK) {
-               format = __resizer_get_format(resizer, fh, RESIZER_PAD_SOURCE_MEM,
-                                          fmt->which);
+               format = __resizer_get_format(resizer, fh,
+                                             RESIZER_PAD_SOURCE_MEM,
+                                             fmt->which);
                *format = fmt->format;
                resizer_try_format(resizer, fh, RESIZER_PAD_SOURCE_MEM, format,
                                fmt->which);
        return 0;
 }
 
-static int resizer_link_validate(struct v4l2_subdev *sd, struct media_link *link,
+static int resizer_link_validate(struct v4l2_subdev *sd,
+                                struct media_link *link,
                                 struct v4l2_subdev_format *source_fmt,
                                 struct v4l2_subdev_format *sink_fmt)
 {
  * formats are initialized on the file handle. Otherwise active formats are
  * initialized on the device.
  */
-static int resizer_init_formats(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
+static int resizer_init_formats(struct v4l2_subdev *sd,
+                               struct v4l2_subdev_fh *fh)
 {
        struct v4l2_subdev_format format;
 
                return ret;
 
        /* Connect the RESIZER subdev to the video node. */
-       ret = media_entity_create_link(&resizer->subdev.entity, RESIZER_PAD_SOURCE_MEM,
-                       &resizer->video_out.video.entity, 0, 0);
+       ret = media_entity_create_link(&resizer->subdev.entity,
+                                      RESIZER_PAD_SOURCE_MEM,
+                                      &resizer->video_out.video.entity, 0, 0);
        if (ret < 0)
                return ret;
 
 
  * Video queue operations
  */
 
-static int iss_video_queue_setup(struct vb2_queue *vq, const struct v4l2_format *fmt,
+static int iss_video_queue_setup(struct vb2_queue *vq,
+                                const struct v4l2_format *fmt,
                                 unsigned int *count, unsigned int *num_planes,
                                 unsigned int sizes[], void *alloc_ctxs[])
 {
 
        alloc_ctxs[0] = video->alloc_ctx;
 
-       *count = min(*count, (unsigned int)(video->capture_mem / PAGE_ALIGN(sizes[0])));
+       *count = min(*count, video->capture_mem / PAGE_ALIGN(sizes[0]));
 
        return 0;
 }
         * first, so the input number might lag behind by 1 in some cases.
         */
        if (video == pipe->output && !pipe->do_propagation)
-               buf->vb.v4l2_buf.sequence = atomic_inc_return(&pipe->frame_number);
+               buf->vb.v4l2_buf.sequence =
+                       atomic_inc_return(&pipe->frame_number);
        else
                buf->vb.v4l2_buf.sequence = atomic_read(&pipe->frame_number);
 
-       vb2_buffer_done(&buf->vb, pipe->error ? VB2_BUF_STATE_ERROR : VB2_BUF_STATE_DONE);
+       vb2_buffer_done(&buf->vb, pipe->error ?
+                       VB2_BUF_STATE_ERROR : VB2_BUF_STATE_DONE);
        pipe->error = false;
 
        spin_lock_irqsave(&video->qlock, flags);