Show a patch.

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

{
    "id": 15841,
    "url": "https://patchwork.libcamera.org/api/patches/15841/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/15841/",
    "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-2-laurent.pinchart@ideasonboard.com>",
    "date": "2022-05-10T11:50:58",
    "name": "[libcamera-devel,01/50] staging: media: imx: imx7-media-csi: Initialize locks early on",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": false,
    "hash": "106f7527b30c94e9ea091cd319c0f011e757708f",
    "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/15841/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/15841/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/15841/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 5A117C3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 10 May 2022 11:52:00 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C1D1665646;\n\tTue, 10 May 2022 13:51:59 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A7C3F65643\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 10 May 2022 13:51:57 +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 B4EABB60;\n\tTue, 10 May 2022 13:51:56 +0200 (CEST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1652183519;\n\tbh=ID7KsvsOkIXuQ4cSOB4gIYwOWmaaua/BqNjfCaF7y3I=;\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=rfF+V1Aab6QK8RSk7QlXZkNjZLaIcjMxSmpiIVluMZsXLK4AK09/V0yd077I+iftU\n\t9rSlecTLkXnPCV3zbNIhB4ZEm8f4p+6qvFTzYn2+nC8Y0ehGAV1FXggctTWq5kvTgz\n\t2zp0rGpS/3iv/Ro19I/vZejXHrqCeJblXUTCtMck1yDReS5ORNVfNx3e4nCyl7Nt8C\n\tvRRk/1EvPLb4PFK5DaJbFreTDmQt/vfQflx2QgXkrRZGSpigOFF9f9qo4y11OTumvL\n\t0NpypI1HMH7xCZDcEL54bkf+LQCuI9aRuCtQcrFzK4FaSrjPRuyZ/qFx61MK8SHWwz\n\tmXHCFtbEmwuxQ==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1652183517;\n\tbh=ID7KsvsOkIXuQ4cSOB4gIYwOWmaaua/BqNjfCaF7y3I=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=JF8zwD2G6PQYjAGifRPKTNZqP2K7//gyJOVepUnbUt/9sZDDMSlr2ybLbqQBcKWVG\n\tHSMAJW8aLmCmFyzaK4hbOrr5VPxH1vrmukrKWZC44ufGg/947utzRzokxC4iuZpnHJ\n\tFeSvSbDhGmUi+TCmSXKiQQx3blxb1pKXUGT6ETjY="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"JF8zwD2G\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue, 10 May 2022 14:50:58 +0300",
        "Message-Id": "<20220510115147.19360-2-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 01/50] staging: media: imx:\n\timx7-media-csi: Initialize locks early on",
        "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": "Group all the direct initialization of imx7_csi fields at the beginning\nof the imx7_csi_probe() function instead of spreading them around.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n drivers/staging/media/imx/imx7-media-csi.c | 22 +++++++++++++---------\n 1 file changed, 13 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/drivers/staging/media/imx/imx7-media-csi.c b/drivers/staging/media/imx/imx7-media-csi.c\nindex 8467a1491048..893620e8fc03 100644\n--- a/drivers/staging/media/imx/imx7-media-csi.c\n+++ b/drivers/staging/media/imx/imx7-media-csi.c\n@@ -1188,27 +1188,32 @@ static int imx7_csi_probe(struct platform_device *pdev)\n \t\treturn -ENOMEM;\n \n \tcsi->dev = dev;\n+\tplatform_set_drvdata(pdev, &csi->sd);\n+\n+\tspin_lock_init(&csi->irqlock);\n+\tmutex_init(&csi->lock);\n \n \tcsi->mclk = devm_clk_get(&pdev->dev, \"mclk\");\n \tif (IS_ERR(csi->mclk)) {\n \t\tret = PTR_ERR(csi->mclk);\n \t\tdev_err(dev, \"Failed to get mclk: %d\", ret);\n-\t\treturn ret;\n+\t\tgoto destroy_mutex;\n \t}\n \n \tcsi->irq = platform_get_irq(pdev, 0);\n-\tif (csi->irq < 0)\n-\t\treturn csi->irq;\n+\tif (csi->irq < 0) {\n+\t\tret = csi->irq;\n+\t\tgoto destroy_mutex;\n+\t}\n \n \tcsi->regbase = devm_platform_ioremap_resource(pdev, 0);\n-\tif (IS_ERR(csi->regbase))\n-\t\treturn PTR_ERR(csi->regbase);\n+\tif (IS_ERR(csi->regbase)) {\n+\t\tret = PTR_ERR(csi->regbase);\n+\t\tgoto destroy_mutex;\n+\t}\n \n \tcsi->model = (enum imx_csi_model)(uintptr_t)of_device_get_match_data(&pdev->dev);\n \n-\tspin_lock_init(&csi->irqlock);\n-\tmutex_init(&csi->lock);\n-\n \t/* install interrupt handler */\n \tret = devm_request_irq(dev, csi->irq, imx7_csi_irq_handler, 0, \"csi\",\n \t\t\t       (void *)csi);\n@@ -1223,7 +1228,6 @@ static int imx7_csi_probe(struct platform_device *pdev)\n \t\tret = PTR_ERR(imxmd);\n \t\tgoto destroy_mutex;\n \t}\n-\tplatform_set_drvdata(pdev, &csi->sd);\n \n \tret = imx_media_of_add_csi(imxmd, node);\n \tif (ret < 0 && ret != -ENODEV && ret != -EEXIST)\n",
    "prefixes": [
        "libcamera-devel",
        "01/50"
    ]
}