Show a patch.

GET /api/patches/15856/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 15856,
    "url": "https://patchwork.libcamera.org/api/patches/15856/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/15856/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20220510115147.19360-17-laurent.pinchart@ideasonboard.com>",
    "date": "2022-05-10T11:51:13",
    "name": "[libcamera-devel,16/50] staging: media: imx: imx7-media-csi: Ensure consistent function prefix",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": false,
    "hash": "2bfef638562db0e26f833fe40b518c98e6f52f93",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/15856/mbox/",
    "series": [
        {
            "id": 3106,
            "url": "https://patchwork.libcamera.org/api/series/3106/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3106",
            "date": "2022-05-10T11:50:57",
            "name": "staging: media: imx: Prepare destaging of imx7-media-csi",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3106/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/15856/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/15856/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>",
        "X-Original-To": "parsemail@patchwork.libcamera.org",
        "Delivered-To": "parsemail@patchwork.libcamera.org",
        "Received": [
            "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id DD56DC326D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 10 May 2022 11:52:18 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7E34D65684;\n\tTue, 10 May 2022 13:52:18 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DF80C6565C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 10 May 2022 13:52:10 +0200 (CEST)",
            "from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 085C9E0C;\n\tTue, 10 May 2022 13:52:09 +0200 (CEST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1652183538;\n\tbh=ntJKLze6OrE+9OL6FEXItJoTrYmk7Yeef2Xythqg8GY=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=rT8omwriDjOHO1G9J6FDXrwTOjJrqmIHwqyqcZgC1PeqirgxK45N5RNyaxUFChbw8\n\tU+H9BU7sd0HtZVyf5GkzzpXKljqPJ/VsZrqkA4eB+ga9m6woms0Qt3hviwrQ0iekaG\n\tStTBypeDRIgv/DKW0YmMdMKWBrI2loIFhvb6PdluMYDzRHm8kL+JeKkgo3MSxKU58k\n\tpCRRzBRziCD9DeTsf8jvzdTjzilQnsKuVWXi7nf/pDrx/wWN01jVYYTKxgvTfm1Jy6\n\tSk+UjJjndsm7q0l7eDgjjs3XmM0ziQ95VaV0z4ZsTA8a6I5Q72OCnXS0SMq4nP03Wm\n\tRQ8LjMIrzLsdg==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1652183530;\n\tbh=ntJKLze6OrE+9OL6FEXItJoTrYmk7Yeef2Xythqg8GY=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=NPdxTvyxk32fZs75AachcvW4KO0/8CKg8JlNQC2rCisTJWoy2rm5iG+cpcaeqs8CC\n\thtrmf2mfZA8FyrUnYWdEPRfv2TZXe2X25nRk6tfpVgWDRuEWD06v89ypYsoYc0UemA\n\tO5+JnDHjbg+2eKDd4yZMayAMqPR58ow4t8CZNrrk="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"NPdxTvyx\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue, 10 May 2022 14:51:13 +0300",
        "Message-Id": "<20220510115147.19360-17-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.35.1",
        "In-Reply-To": "<20220510115147.19360-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20220510115147.19360-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 16/50] staging: media: imx:\n\timx7-media-csi: Ensure consistent function prefix",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "<libcamera-devel.lists.libcamera.org>",
        "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>",
        "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>",
        "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>",
        "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "From": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "Cc": "Martin Kepplinger <martin.kepplinger@puri.sm>, kernel@pengutronix.de,\n\tDorota Czaplejewicz <dorota.czaplejewicz@puri.sm>,\n\tAlexander Stein <alexander.stein@ew.tq-group.com>,\n\tRui Miguel Silva <rmfrfs@gmail.com>,\n\tPhilipp Zabel <p.zabel@pengutronix.de>, \n\tSteve Longerbeam <slongerbeam@gmail.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Rename all the functions and macros imported from imx-media-capture.c\nwith a consistent imx7_csi_video_ prefix. No functional change intended.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n drivers/staging/media/imx/imx7-media-csi.c | 164 ++++++++++-----------\n 1 file changed, 80 insertions(+), 84 deletions(-)",
    "diff": "diff --git a/drivers/staging/media/imx/imx7-media-csi.c b/drivers/staging/media/imx/imx7-media-csi.c\nindex 9b4463e456c2..80d666416d47 100644\n--- a/drivers/staging/media/imx/imx7-media-csi.c\n+++ b/drivers/staging/media/imx/imx7-media-csi.c\n@@ -162,6 +162,10 @@\n #define CSI_CSICR18\t\t\t0x48\n #define CSI_CSICR19\t\t\t0x4c\n \n+#define IMX7_CSI_VIDEO_NAME\t\t\"imx-capture\"\n+/* In bytes, per queue */\n+#define IMX7_CSI_VIDEO_MEM_LIMIT\tSZ_64M\n+\n enum imx_csi_model {\n \tIMX7_CSI_IMX7 = 0,\n \tIMX7_CSI_IMX8MQ,\n@@ -349,8 +353,7 @@ static void imx7_csi_update_buf(struct imx7_csi *csi, dma_addr_t phys,\n \t\timx7_csi_reg_write(csi, phys, CSI_CSIDMASA_FB1);\n }\n \n-static struct imx_media_buffer *\n-imx7_media_capture_device_next_buf(struct imx7_csi *csi);\n+static struct imx_media_buffer *imx7_csi_video_next_buf(struct imx7_csi *csi);\n \n static void imx7_csi_setup_vb2_buf(struct imx7_csi *csi)\n {\n@@ -360,7 +363,7 @@ static void imx7_csi_setup_vb2_buf(struct imx7_csi *csi)\n \tint i;\n \n \tfor (i = 0; i < 2; i++) {\n-\t\tbuf = imx7_media_capture_device_next_buf(csi);\n+\t\tbuf = imx7_csi_video_next_buf(csi);\n \t\tif (buf) {\n \t\t\tcsi->active_vb2_buf[i] = buf;\n \t\t\tvb2_buf = &buf->vbuf.vb2_buf;\n@@ -662,7 +665,7 @@ static void imx7_csi_vb2_buf_done(struct imx7_csi *csi)\n \tcsi->frame_sequence++;\n \n \t/* get next queued buffer */\n-\tnext = imx7_media_capture_device_next_buf(csi);\n+\tnext = imx7_csi_video_next_buf(csi);\n \tif (next) {\n \t\tphys = vb2_dma_contig_plane_dma_addr(&next->vbuf.vb2_buf, 0);\n \t\tcsi->active_vb2_buf[csi->buf_num] = next;\n@@ -732,20 +735,12 @@ static irqreturn_t imx7_csi_irq_handler(int irq, void *data)\n \treturn IRQ_HANDLED;\n }\n \n-/* -----------------------------------------------------------------------------\n- * Video Capture Device\n- */\n-\n-#define IMX_CAPTURE_NAME \"imx-capture\"\n-\n-/* In bytes, per queue */\n-#define VID_MEM_LIMIT\tSZ_64M\n-\n /* -----------------------------------------------------------------------------\n  * Video Capture Device - IOCTLs\n  */\n \n-static const struct imx_media_pixfmt *capture_find_format(u32 code, u32 fourcc)\n+static const struct imx_media_pixfmt *\n+imx7_csi_video_find_format(u32 code, u32 fourcc)\n {\n \tconst struct imx_media_pixfmt *cc;\n \n@@ -766,28 +761,28 @@ static const struct imx_media_pixfmt *capture_find_format(u32 code, u32 fourcc)\n \treturn imx_media_find_mbus_format(code, PIXFMT_SEL_ANY);\n }\n \n-static int capture_querycap(struct file *file, void *fh,\n-\t\t\t    struct v4l2_capability *cap)\n+static int imx7_csi_video_querycap(struct file *file, void *fh,\n+\t\t\t\t   struct v4l2_capability *cap)\n {\n \tstruct imx7_csi *csi = video_drvdata(file);\n \n-\tstrscpy(cap->driver, IMX_CAPTURE_NAME, sizeof(cap->driver));\n-\tstrscpy(cap->card, IMX_CAPTURE_NAME, sizeof(cap->card));\n+\tstrscpy(cap->driver, IMX7_CSI_VIDEO_NAME, sizeof(cap->driver));\n+\tstrscpy(cap->card, IMX7_CSI_VIDEO_NAME, sizeof(cap->card));\n \tsnprintf(cap->bus_info, sizeof(cap->bus_info),\n \t\t \"platform:%s\", dev_name(csi->dev));\n \n \treturn 0;\n }\n \n-static int capture_enum_fmt_vid_cap(struct file *file, void *fh,\n-\t\t\t\t    struct v4l2_fmtdesc *f)\n+static int imx7_csi_video_enum_fmt_vid_cap(struct file *file, void *fh,\n+\t\t\t\t\t   struct v4l2_fmtdesc *f)\n {\n \treturn imx_media_enum_pixel_formats(&f->pixelformat, f->index,\n \t\t\t\t\t    PIXFMT_SEL_ANY, f->mbus_code);\n }\n \n-static int capture_enum_framesizes(struct file *file, void *fh,\n-\t\t\t\t   struct v4l2_frmsizeenum *fsize)\n+static int imx7_csi_video_enum_framesizes(struct file *file, void *fh,\n+\t\t\t\t\t  struct v4l2_frmsizeenum *fsize)\n {\n \tconst struct imx_media_pixfmt *cc;\n \n@@ -814,8 +809,8 @@ static int capture_enum_framesizes(struct file *file, void *fh,\n \treturn 0;\n }\n \n-static int capture_g_fmt_vid_cap(struct file *file, void *fh,\n-\t\t\t\t struct v4l2_format *f)\n+static int imx7_csi_video_g_fmt_vid_cap(struct file *file, void *fh,\n+\t\t\t\t\tstruct v4l2_format *f)\n {\n \tstruct imx7_csi *csi = video_drvdata(file);\n \n@@ -825,7 +820,8 @@ static int capture_g_fmt_vid_cap(struct file *file, void *fh,\n }\n \n static const struct imx_media_pixfmt *\n-__capture_try_fmt(struct v4l2_pix_format *pixfmt, struct v4l2_rect *compose)\n+__imx7_csi_video_try_fmt(struct v4l2_pix_format *pixfmt,\n+\t\t\t struct v4l2_rect *compose)\n {\n \tstruct v4l2_mbus_framefmt fmt_src;\n \tconst struct imx_media_pixfmt *cc;\n@@ -867,15 +863,15 @@ __capture_try_fmt(struct v4l2_pix_format *pixfmt, struct v4l2_rect *compose)\n \treturn cc;\n }\n \n-static int capture_try_fmt_vid_cap(struct file *file, void *fh,\n-\t\t\t\t   struct v4l2_format *f)\n+static int imx7_csi_video_try_fmt_vid_cap(struct file *file, void *fh,\n+\t\t\t\t\t  struct v4l2_format *f)\n {\n-\t__capture_try_fmt(&f->fmt.pix, NULL);\n+\t__imx7_csi_video_try_fmt(&f->fmt.pix, NULL);\n \treturn 0;\n }\n \n-static int capture_s_fmt_vid_cap(struct file *file, void *fh,\n-\t\t\t\t struct v4l2_format *f)\n+static int imx7_csi_video_s_fmt_vid_cap(struct file *file, void *fh,\n+\t\t\t\t\tstruct v4l2_format *f)\n {\n \tstruct imx7_csi *csi = video_drvdata(file);\n \tconst struct imx_media_pixfmt *cc;\n@@ -885,7 +881,7 @@ static int capture_s_fmt_vid_cap(struct file *file, void *fh,\n \t\treturn -EBUSY;\n \t}\n \n-\tcc = __capture_try_fmt(&f->fmt.pix, &csi->vdev.compose);\n+\tcc = __imx7_csi_video_try_fmt(&f->fmt.pix, &csi->vdev.compose);\n \n \tcsi->vdev.cc = cc;\n \tcsi->vdev.fmt = f->fmt.pix;\n@@ -893,8 +889,8 @@ static int capture_s_fmt_vid_cap(struct file *file, void *fh,\n \treturn 0;\n }\n \n-static int capture_g_selection(struct file *file, void *fh,\n-\t\t\t       struct v4l2_selection *s)\n+static int imx7_csi_video_g_selection(struct file *file, void *fh,\n+\t\t\t\t      struct v4l2_selection *s)\n {\n \tstruct imx7_csi *csi = video_drvdata(file);\n \n@@ -923,8 +919,8 @@ static int capture_g_selection(struct file *file, void *fh,\n \treturn 0;\n }\n \n-static int capture_subscribe_event(struct v4l2_fh *fh,\n-\t\t\t\t   const struct v4l2_event_subscription *sub)\n+static int imx7_csi_video_subscribe_event(struct v4l2_fh *fh,\n+\t\t\t\t\t  const struct v4l2_event_subscription *sub)\n {\n \tswitch (sub->type) {\n \tcase V4L2_EVENT_IMX_FRAME_INTERVAL_ERROR:\n@@ -934,17 +930,17 @@ static int capture_subscribe_event(struct v4l2_fh *fh,\n \t}\n }\n \n-static const struct v4l2_ioctl_ops capture_ioctl_ops = {\n-\t.vidioc_querycap\t\t= capture_querycap,\n+static const struct v4l2_ioctl_ops imx7_csi_video_ioctl_ops = {\n+\t.vidioc_querycap\t\t= imx7_csi_video_querycap,\n \n-\t.vidioc_enum_fmt_vid_cap\t= capture_enum_fmt_vid_cap,\n-\t.vidioc_enum_framesizes\t\t= capture_enum_framesizes,\n+\t.vidioc_enum_fmt_vid_cap\t= imx7_csi_video_enum_fmt_vid_cap,\n+\t.vidioc_enum_framesizes\t\t= imx7_csi_video_enum_framesizes,\n \n-\t.vidioc_g_fmt_vid_cap\t\t= capture_g_fmt_vid_cap,\n-\t.vidioc_try_fmt_vid_cap\t\t= capture_try_fmt_vid_cap,\n-\t.vidioc_s_fmt_vid_cap\t\t= capture_s_fmt_vid_cap,\n+\t.vidioc_g_fmt_vid_cap\t\t= imx7_csi_video_g_fmt_vid_cap,\n+\t.vidioc_try_fmt_vid_cap\t\t= imx7_csi_video_try_fmt_vid_cap,\n+\t.vidioc_s_fmt_vid_cap\t\t= imx7_csi_video_s_fmt_vid_cap,\n \n-\t.vidioc_g_selection\t\t= capture_g_selection,\n+\t.vidioc_g_selection\t\t= imx7_csi_video_g_selection,\n \n \t.vidioc_reqbufs\t\t\t= vb2_ioctl_reqbufs,\n \t.vidioc_create_bufs\t\t= vb2_ioctl_create_bufs,\n@@ -956,7 +952,7 @@ static const struct v4l2_ioctl_ops capture_ioctl_ops = {\n \t.vidioc_streamon\t\t= vb2_ioctl_streamon,\n \t.vidioc_streamoff\t\t= vb2_ioctl_streamoff,\n \n-\t.vidioc_subscribe_event\t\t= capture_subscribe_event,\n+\t.vidioc_subscribe_event\t\t= imx7_csi_video_subscribe_event,\n \t.vidioc_unsubscribe_event\t= v4l2_event_unsubscribe,\n };\n \n@@ -964,11 +960,11 @@ static const struct v4l2_ioctl_ops capture_ioctl_ops = {\n  * Video Capture Device - Queue Operations\n  */\n \n-static int capture_queue_setup(struct vb2_queue *vq,\n-\t\t\t       unsigned int *nbuffers,\n-\t\t\t       unsigned int *nplanes,\n-\t\t\t       unsigned int sizes[],\n-\t\t\t       struct device *alloc_devs[])\n+static int imx7_csi_video_queue_setup(struct vb2_queue *vq,\n+\t\t\t\t      unsigned int *nbuffers,\n+\t\t\t\t      unsigned int *nplanes,\n+\t\t\t\t      unsigned int sizes[],\n+\t\t\t\t      struct device *alloc_devs[])\n {\n \tstruct imx7_csi *csi = vb2_get_drv_priv(vq);\n \tstruct v4l2_pix_format *pix = &csi->vdev.fmt;\n@@ -983,7 +979,7 @@ static int capture_queue_setup(struct vb2_queue *vq,\n \t\tcount += vq->num_buffers;\n \t}\n \n-\tcount = min_t(__u32, VID_MEM_LIMIT / pix->sizeimage, count);\n+\tcount = min_t(__u32, IMX7_CSI_VIDEO_MEM_LIMIT / pix->sizeimage, count);\n \n \tif (*nplanes)\n \t\t*nbuffers = (count < vq->num_buffers) ? 0 :\n@@ -997,7 +993,7 @@ static int capture_queue_setup(struct vb2_queue *vq,\n \treturn 0;\n }\n \n-static int capture_buf_init(struct vb2_buffer *vb)\n+static int imx7_csi_video_buf_init(struct vb2_buffer *vb)\n {\n \tstruct imx_media_buffer *buf = to_imx_media_vb(vb);\n \n@@ -1006,7 +1002,7 @@ static int capture_buf_init(struct vb2_buffer *vb)\n \treturn 0;\n }\n \n-static int capture_buf_prepare(struct vb2_buffer *vb)\n+static int imx7_csi_video_buf_prepare(struct vb2_buffer *vb)\n {\n \tstruct imx7_csi *csi = vb2_get_drv_priv(vb->vb2_queue);\n \tstruct v4l2_pix_format *pix = &csi->vdev.fmt;\n@@ -1023,7 +1019,7 @@ static int capture_buf_prepare(struct vb2_buffer *vb)\n \treturn 0;\n }\n \n-static void capture_buf_queue(struct vb2_buffer *vb)\n+static void imx7_csi_video_buf_queue(struct vb2_buffer *vb)\n {\n \tstruct imx7_csi *csi = vb2_get_drv_priv(vb->vb2_queue);\n \tstruct imx_media_buffer *buf = to_imx_media_vb(vb);\n@@ -1036,7 +1032,7 @@ static void capture_buf_queue(struct vb2_buffer *vb)\n \tspin_unlock_irqrestore(&csi->q_lock, flags);\n }\n \n-static int capture_validate_fmt(struct imx7_csi *csi)\n+static int imx7_csi_video_validate_fmt(struct imx7_csi *csi)\n {\n \tstruct v4l2_subdev_format fmt_src;\n \tconst struct imx_media_pixfmt *cc;\n@@ -1064,21 +1060,22 @@ static int capture_validate_fmt(struct imx7_csi *csi)\n \t * Verify that the media bus code is compatible with the pixel format\n \t * set on the video node.\n \t */\n-\tcc = capture_find_format(fmt_src.format.code, 0);\n+\tcc = imx7_csi_video_find_format(fmt_src.format.code, 0);\n \tif (!cc || csi->vdev.cc->cs != cc->cs)\n \t\treturn -EPIPE;\n \n \treturn 0;\n }\n \n-static int capture_start_streaming(struct vb2_queue *vq, unsigned int count)\n+static int imx7_csi_video_start_streaming(struct vb2_queue *vq,\n+\t\t\t\t\t  unsigned int count)\n {\n \tstruct imx7_csi *csi = vb2_get_drv_priv(vq);\n \tstruct imx_media_buffer *buf, *tmp;\n \tunsigned long flags;\n \tint ret;\n \n-\tret = capture_validate_fmt(csi);\n+\tret = imx7_csi_video_validate_fmt(csi);\n \tif (ret) {\n \t\tdev_err(csi->dev, \"capture format not valid\\n\");\n \t\tgoto return_bufs;\n@@ -1102,7 +1099,7 @@ static int capture_start_streaming(struct vb2_queue *vq, unsigned int count)\n \treturn ret;\n }\n \n-static void capture_stop_streaming(struct vb2_queue *vq)\n+static void imx7_csi_video_stop_streaming(struct vb2_queue *vq)\n {\n \tstruct imx7_csi *csi = vb2_get_drv_priv(vq);\n \tstruct imx_media_buffer *frame;\n@@ -1123,22 +1120,22 @@ static void capture_stop_streaming(struct vb2_queue *vq)\n \tspin_unlock_irqrestore(&csi->q_lock, flags);\n }\n \n-static const struct vb2_ops capture_qops = {\n-\t.queue_setup\t = capture_queue_setup,\n-\t.buf_init        = capture_buf_init,\n-\t.buf_prepare\t = capture_buf_prepare,\n-\t.buf_queue\t = capture_buf_queue,\n+static const struct vb2_ops imx7_csi_video_qops = {\n+\t.queue_setup\t = imx7_csi_video_queue_setup,\n+\t.buf_init        = imx7_csi_video_buf_init,\n+\t.buf_prepare\t = imx7_csi_video_buf_prepare,\n+\t.buf_queue\t = imx7_csi_video_buf_queue,\n \t.wait_prepare\t = vb2_ops_wait_prepare,\n \t.wait_finish\t = vb2_ops_wait_finish,\n-\t.start_streaming = capture_start_streaming,\n-\t.stop_streaming  = capture_stop_streaming,\n+\t.start_streaming = imx7_csi_video_start_streaming,\n+\t.stop_streaming  = imx7_csi_video_stop_streaming,\n };\n \n /* -----------------------------------------------------------------------------\n  * Video Capture Device - File Operations\n  */\n \n-static int capture_open(struct file *file)\n+static int imx7_csi_video_open(struct file *file)\n {\n \tstruct imx7_csi *csi = video_drvdata(file);\n \tstruct video_device *vfd = csi->vdev.vfd;\n@@ -1162,7 +1159,7 @@ static int capture_open(struct file *file)\n \treturn ret;\n }\n \n-static int capture_release(struct file *file)\n+static int imx7_csi_video_release(struct file *file)\n {\n \tstruct imx7_csi *csi = video_drvdata(file);\n \tstruct video_device *vfd = csi->vdev.vfd;\n@@ -1182,10 +1179,10 @@ static int capture_release(struct file *file)\n \treturn 0;\n }\n \n-static const struct v4l2_file_operations capture_fops = {\n+static const struct v4l2_file_operations imx7_csi_video_fops = {\n \t.owner\t\t= THIS_MODULE,\n-\t.open\t\t= capture_open,\n-\t.release\t= capture_release,\n+\t.open\t\t= imx7_csi_video_open,\n+\t.release\t= imx7_csi_video_release,\n \t.poll\t\t= vb2_fop_poll,\n \t.unlocked_ioctl\t= video_ioctl2,\n \t.mmap\t\t= vb2_fop_mmap,\n@@ -1195,8 +1192,7 @@ static const struct v4l2_file_operations capture_fops = {\n  * Video Capture Device - Init & Cleanup\n  */\n \n-static struct imx_media_buffer *\n-imx7_media_capture_device_next_buf(struct imx7_csi *csi)\n+static struct imx_media_buffer *imx7_csi_video_next_buf(struct imx7_csi *csi)\n {\n \tstruct imx_media_buffer *buf = NULL;\n \tunsigned long flags;\n@@ -1215,7 +1211,7 @@ imx7_media_capture_device_next_buf(struct imx7_csi *csi)\n \treturn buf;\n }\n \n-static int capture_init_format(struct imx7_csi *csi)\n+static int imx7_csi_video_init_format(struct imx7_csi *csi)\n {\n \tstruct v4l2_subdev_format fmt_src = {\n \t\t.pad = IMX7_CSI_PAD_SRC,\n@@ -1237,7 +1233,7 @@ static int capture_init_format(struct imx7_csi *csi)\n \treturn 0;\n }\n \n-static int imx7_media_capture_device_register(struct imx7_csi *csi)\n+static int imx7_csi_video_register(struct imx7_csi *csi)\n {\n \tstruct v4l2_subdev *sd = &csi->sd;\n \tstruct v4l2_device *v4l2_dev = sd->v4l2_dev;\n@@ -1247,7 +1243,7 @@ static int imx7_media_capture_device_register(struct imx7_csi *csi)\n \tvfd->v4l2_dev = v4l2_dev;\n \n \t/* Initialize the default format and compose rectangle. */\n-\tret = capture_init_format(csi);\n+\tret = imx7_csi_video_init_format(csi);\n \tif (ret < 0)\n \t\treturn ret;\n \n@@ -1277,7 +1273,7 @@ static int imx7_media_capture_device_register(struct imx7_csi *csi)\n \treturn 0;\n }\n \n-static void imx7_media_capture_device_unregister(struct imx7_csi *csi)\n+static void imx7_csi_video_unregister(struct imx7_csi *csi)\n {\n \tstruct video_device *vfd = csi->vdev.vfd;\n \n@@ -1285,7 +1281,7 @@ static void imx7_media_capture_device_unregister(struct imx7_csi *csi)\n \tvideo_unregister_device(vfd);\n }\n \n-static int imx7_media_capture_device_init(struct imx7_csi *csi)\n+static int imx7_csi_video_init(struct imx7_csi *csi)\n {\n \tstruct video_device *vfd;\n \tstruct vb2_queue *vq;\n@@ -1300,8 +1296,8 @@ static int imx7_media_capture_device_init(struct imx7_csi *csi)\n \tif (!vfd)\n \t\treturn -ENOMEM;\n \n-\tvfd->fops = &capture_fops;\n-\tvfd->ioctl_ops = &capture_ioctl_ops;\n+\tvfd->fops = &imx7_csi_video_fops;\n+\tvfd->ioctl_ops = &imx7_csi_video_ioctl_ops;\n \tvfd->minor = -1;\n \tvfd->release = video_device_release;\n \tvfd->vfl_dir = VFL_DIR_RX;\n@@ -1331,7 +1327,7 @@ static int imx7_media_capture_device_init(struct imx7_csi *csi)\n \tvq->io_modes = VB2_MMAP | VB2_DMABUF;\n \tvq->drv_priv = csi;\n \tvq->buf_struct_size = sizeof(struct imx_media_buffer);\n-\tvq->ops = &capture_qops;\n+\tvq->ops = &imx7_csi_video_qops;\n \tvq->mem_ops = &vb2_dma_contig_memops;\n \tvq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;\n \tvq->lock = &csi->vdev_mutex;\n@@ -1681,11 +1677,11 @@ static int imx7_csi_registered(struct v4l2_subdev *sd)\n \tstruct imx7_csi *csi = v4l2_get_subdevdata(sd);\n \tint ret;\n \n-\tret = imx7_media_capture_device_init(csi);\n+\tret = imx7_csi_video_init(csi);\n \tif (ret)\n \t\treturn ret;\n \n-\tret = imx7_media_capture_device_register(csi);\n+\tret = imx7_csi_video_register(csi);\n \tif (ret)\n \t\treturn ret;\n \n@@ -1700,7 +1696,7 @@ static int imx7_csi_registered(struct v4l2_subdev *sd)\n \treturn 0;\n \n err_unreg:\n-\timx7_media_capture_device_unregister(csi);\n+\timx7_csi_video_unregister(csi);\n \treturn ret;\n }\n \n@@ -1708,7 +1704,7 @@ static void imx7_csi_unregistered(struct v4l2_subdev *sd)\n {\n \tstruct imx7_csi *csi = v4l2_get_subdevdata(sd);\n \n-\timx7_media_capture_device_unregister(csi);\n+\timx7_csi_video_unregister(csi);\n }\n \n static const struct v4l2_subdev_video_ops imx7_csi_video_ops = {\n",
    "prefixes": [
        "libcamera-devel",
        "16/50"
    ]
}