Show a patch.

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

{
    "id": 3831,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/3831/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/3831/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/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": "<20200521135416.13685-2-email@uajain.com>",
    "date": "2020-05-21T13:54:23",
    "name": "[libcamera-devel,v3,1/5] libcamera: camera_manager: Refactor device enumeration into separate function",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "491bd8faf58dd8809e971d88881e4a33d3671c3b",
    "submitter": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/people/1/?format=api",
        "name": "Umang Jain",
        "email": "email@uajain.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/3831/mbox/",
    "series": [
        {
            "id": 920,
            "url": "https://patchwork.libcamera.org/api/1.1/series/920/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=920",
            "date": "2020-05-21T13:54:23",
            "name": "Introduce UVC hotplugging support",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/920/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/3831/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/3831/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<bounces+15657259-5c31-libcamera-devel=lists.libcamera.org@em7280.uajain.com>",
        "Received": [
            "from o1.f.az.sendgrid.net (o1.f.az.sendgrid.net [208.117.55.132])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1231F603D9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 May 2020 15:54:24 +0200 (CEST)",
            "by filterdrecv-p3iad2-8ddf98858-z54vx with SMTP id\n\tfilterdrecv-p3iad2-8ddf98858-z54vx-21-5EC6880F-2C\n\t2020-05-21 13:54:23.393741462 +0000 UTC m=+4884413.876381335",
            "from mail.uajain.com (unknown)\n\tby ismtpd0007p1hnd1.sendgrid.net (SG) with ESMTP id\n\tDeCBve0bRmiF6NygHMSz7A for <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 May 2020 13:54:23.027 +0000 (UTC)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=uajain.com\n\theader.i=@uajain.com header.b=\"LNO1b5uf\"; \n\tdkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=uajain.com;\n\th=from:subject:in-reply-to:references:mime-version:to:cc:\n\tcontent-transfer-encoding:content-type;\n\ts=s1; bh=wn+gdJqcuE9rglJzbT/jTFN06B0QGnuQfW53WggZ38o=;\n\tb=LNO1b5ufanmHUtu0RI3Gb85ns6yVeTG+r+hzIniZqqtEGJM0UvNLSV09Bo0fA4MbyUKd\n\tdOes8Dy+CkaJv4V/7gnYC9sx12DxEg1fY5jAQ4QS27pTFCQ3Wxc8ihyl6WQBWViNRvYkq2\n\tinOdae1I7vFTQkEZInug1bhrvwkfQRDcs=",
        "From": "Umang Jain <email@uajain.com>",
        "Date": "Thu, 21 May 2020 13:54:23 +0000 (UTC)",
        "Message-Id": "<20200521135416.13685-2-email@uajain.com>",
        "In-Reply-To": "<20200521135416.13685-1-email@uajain.com>",
        "References": "<20200521135416.13685-1-email@uajain.com>",
        "Mime-Version": "1.0",
        "X-SG-EID": "1Q40EQ7YGir8a9gjSIAdTjhngY657NMk9ckeo4dbHZDiOpywc/L3L9rFqlwE4KPcu4OVMbZ0DPo4pBBcZhwsTNJljPL69hOm6sh0zLvK/f8YcU6EYwcaDRtEIrRA1LqGi7+lhb+/Q81m6Tapah73poiLqsoJ4Qk0QyAEO35p9RnhyRGzKAZ+xwV4TFFEFVIZdwRNZA7ANIvy5+ZaVtmPutVZE9dIdENxy+63Yu/o2XQ4gw8AjCwKSvTVTW9tHii5myKb8ZwrHOJdWA03RkbRsA==",
        "To": "libcamera-devel@lists.libcamera.org",
        "Content-Transfer-Encoding": "7bit",
        "Content-Type": "text/plain; charset=us-ascii",
        "Subject": "[libcamera-devel] [PATCH v3 1/5] libcamera: camera_manager:\n\tRefactor device enumeration into separate function",
        "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>",
        "X-List-Received-Date": "Thu, 21 May 2020 13:54:27 -0000"
    },
    "content": "This commit introduces no functional changes.\nSplit device enumeration code into a separate function,\nso that the function can be re-used for upcoming hotplug\nfunctionality in subsequent commits.\n\nAlso, fixup correct tag for \\todo.\n\nSigned-off-by: Umang Jain <email@uajain.com>\n---\n src/libcamera/camera_manager.cpp | 19 +++++++++++++------\n 1 file changed, 13 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp\nindex 849377a..8d9cb02 100644\n--- a/src/libcamera/camera_manager.cpp\n+++ b/src/libcamera/camera_manager.cpp\n@@ -53,6 +53,7 @@ protected:\n \n private:\n \tint init();\n+\tvoid enumerateDevices();\n \tvoid cleanup();\n \n \tCameraManager *cm_;\n@@ -120,12 +121,20 @@ int CameraManager::Private::init()\n \tif (!enumerator_ || enumerator_->enumerate())\n \t\treturn -ENODEV;\n \n+\tenumerateDevices();\n+\n+\treturn 0;\n+}\n+\n+void CameraManager::Private::enumerateDevices()\n+{\n \t/*\n-\t * TODO: Try to read handlers and order from configuration\n+\t * \\todo Try to read handlers and order from configuration\n \t * file and only fallback on all handlers if there is no\n \t * configuration file.\n \t */\n-\tstd::vector<PipelineHandlerFactory *> &factories = PipelineHandlerFactory::factories();\n+\tstd::vector<PipelineHandlerFactory *> &factories =\n+\t\tPipelineHandlerFactory::factories();\n \n \tfor (PipelineHandlerFactory *factory : factories) {\n \t\t/*\n@@ -144,14 +153,12 @@ int CameraManager::Private::init()\n \t\t}\n \t}\n \n-\t/* TODO: register hot-plug callback here */\n-\n-\treturn 0;\n+\t/* \\todo register hot-plug callback here */\n }\n \n void CameraManager::Private::cleanup()\n {\n-\t/* TODO: unregister hot-plug callback here */\n+\t/* \\todo unregister hot-plug callback here */\n \n \t/*\n \t * Release all references to cameras and pipeline handlers to ensure\n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "1/5"
    ]
}