Show a patch.

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

{
    "id": 1764,
    "url": "https://patchwork.libcamera.org/api/patches/1764/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/1764/",
    "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": "<20190809150459.14421-3-kieran.bingham@ideasonboard.com>",
    "date": "2019-08-09T15:04:55",
    "name": "[libcamera-devel,v2,2/6] libcamera: v4l2_videodevice: Fix ordering of debug statement",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "58529767ff37e09de14b9d9d675203227c775eb1",
    "submitter": {
        "id": 4,
        "url": "https://patchwork.libcamera.org/api/people/4/?format=api",
        "name": "Kieran Bingham",
        "email": "kieran.bingham@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/1764/mbox/",
    "series": [
        {
            "id": 451,
            "url": "https://patchwork.libcamera.org/api/series/451/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=451",
            "date": "2019-08-09T15:04:53",
            "name": "V4L2 M2M Support (+RPi PoC)",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/451/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/1764/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/1764/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<kieran.bingham@ideasonboard.com>",
        "Received": [
            "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 D4A7361623\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  9 Aug 2019 17:05:04 +0200 (CEST)",
            "from localhost.localdomain\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3DCCC99F;\n\tFri,  9 Aug 2019 17:05:04 +0200 (CEST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1565363104;\n\tbh=IfHHB8dfTYxK3Lv0mDTbPdiEtnFRE5efgajG5Or+d+M=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=FViprb7q2ieKCI2U9gE8B4O9DUyDSjTTTH5PYqNTgCzrGd3QK2vQ5wtsG3n7roJ2C\n\tYVCzf3HkJzqOz/1qpOn8rHdNT5Ggq5F4KmjDt4NLxMGfo45g7Cz4uEzvimi8pSMXul\n\tOPEI0Z0MG2cpJqp5NneHfGH4jagM2PMMYvtFWUKI=",
        "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>",
        "To": "LibCamera Devel <libcamera-devel@lists.libcamera.org>",
        "Date": "Fri,  9 Aug 2019 16:04:55 +0100",
        "Message-Id": "<20190809150459.14421-3-kieran.bingham@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20190809150459.14421-1-kieran.bingham@ideasonboard.com>",
        "References": "<20190809150459.14421-1-kieran.bingham@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2 2/6] libcamera: v4l2_videodevice: Fix\n\tordering of debug statement",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.23",
        "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>",
        "X-List-Received-Date": "Fri, 09 Aug 2019 15:05:05 -0000"
    },
    "content": "The \"Opened device\" statement occurs before the buffertype_ is set.\n\nThis causes all devices to report that they are [out] devices at open()\nregardless of their type.\n\nAs the message operates in the past-tense, move the statement to the end\nof the function when all work has been completed.\n\nFixes: 04d5be7f76fe (\"libcamera: v4l2_device: Inherit from Loggable to print device node name\")\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/v4l2_videodevice.cpp | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\nindex c43d7cc557a0..81098dd70190 100644\n--- a/src/libcamera/v4l2_videodevice.cpp\n+++ b/src/libcamera/v4l2_videodevice.cpp\n@@ -314,10 +314,6 @@ int V4L2VideoDevice::open()\n \t\treturn ret;\n \t}\n \n-\tLOG(V4L2, Debug)\n-\t\t<< \"Opened device \" << caps_.bus_info() << \": \"\n-\t\t<< caps_.driver() << \": \" << caps_.card();\n-\n \tif (!caps_.hasStreaming()) {\n \t\tLOG(V4L2, Error) << \"Device does not support streaming I/O\";\n \t\treturn -EINVAL;\n@@ -352,6 +348,10 @@ int V4L2VideoDevice::open()\n \tfdEvent_->activated.connect(this, &V4L2VideoDevice::bufferAvailable);\n \tfdEvent_->setEnabled(false);\n \n+\tLOG(V4L2, Debug)\n+\t\t<< \"Opened device \" << caps_.bus_info() << \": \"\n+\t\t<< caps_.driver() << \": \" << caps_.card();\n+\n \treturn 0;\n }\n \n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "2/6"
    ]
}