Show a patch.

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

{
    "id": 24731,
    "url": "https://patchwork.libcamera.org/api/patches/24731/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/24731/",
    "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": "<20251023144841.403689-4-stefan.klug@ideasonboard.com>",
    "date": "2025-10-23T14:48:04",
    "name": "[v2,03/35] libcamera: v4l2: Remove fromEntityName(MediaDevice*)",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "515a85169fd663f6312e6b1213256a13e42e093e",
    "submitter": {
        "id": 184,
        "url": "https://patchwork.libcamera.org/api/people/184/?format=api",
        "name": "Stefan Klug",
        "email": "stefan.klug@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/24731/mbox/",
    "series": [],
    "comments": "https://patchwork.libcamera.org/api/patches/24731/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/24731/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 88DF0C3332\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 23 Oct 2025 14:48:56 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7C9AF607F6;\n\tThu, 23 Oct 2025 16:48:55 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CD152606DE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 23 Oct 2025 16:48:54 +0200 (CEST)",
            "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:7328:357b:4ce1:72b6])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id D94861AA6; \n\tThu, 23 Oct 2025 16:47:09 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"bID/xZNh\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1761230830;\n\tbh=H0nNmAan3FzGqsERM4FnQaO71k5GY1eNHpOgMviD1Wk=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=bID/xZNhDFBDwncCx1ul2zy/6CvHzXcEMBLf0mi6Q44BWPzuM0bgcZSbI3G0vr9CN\n\td1A7Bpt5y7mQz1Sy/R2NcxOdkeaRn/sWdLsCPn8cnXMJtp5673ZSV41XGcSKZlnhKC\n\tWelyeEmCq8kUCMYrGdgBWnfJxRKF8wGKN/f+mRy8=",
        "From": "Stefan Klug <stefan.klug@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>,\n\tPaul Elder <paul.elder@ideasonboard.com>",
        "Subject": "[PATCH v2 03/35] libcamera: v4l2: Remove\n\tfromEntityName(MediaDevice*)",
        "Date": "Thu, 23 Oct 2025 16:48:04 +0200",
        "Message-ID": "<20251023144841.403689-4-stefan.klug@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.48.1",
        "In-Reply-To": "<20251023144841.403689-1-stefan.klug@ideasonboard.com>",
        "References": "<20251023144841.403689-1-stefan.klug@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "From: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nNow that all users of the fromEntityName() helpers use the shared_ptr\nvariant, remove the original functions that are no longer used.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n include/libcamera/internal/v4l2_subdevice.h   |  2 --\n include/libcamera/internal/v4l2_videodevice.h |  2 --\n src/libcamera/v4l2_subdevice.cpp              | 17 +----------------\n src/libcamera/v4l2_videodevice.cpp            | 17 +----------------\n 4 files changed, 2 insertions(+), 36 deletions(-)",
    "diff": "diff --git a/include/libcamera/internal/v4l2_subdevice.h b/include/libcamera/internal/v4l2_subdevice.h\nindex d1c8b838d49b..b4b41806638c 100644\n--- a/include/libcamera/internal/v4l2_subdevice.h\n+++ b/include/libcamera/internal/v4l2_subdevice.h\n@@ -161,8 +161,6 @@ public:\n \tconst std::string &model();\n \tconst V4L2SubdeviceCapability &caps() const { return caps_; }\n \n-\tstatic std::unique_ptr<V4L2Subdevice>\n-\tfromEntityName(const MediaDevice *media, const std::string &entity);\n \tstatic std::unique_ptr<V4L2Subdevice>\n \tfromEntityName(std::shared_ptr<const MediaDevice>, const std::string &entity);\n \ndiff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h\nindex 4f80f7176174..5a7dcfdda118 100644\n--- a/include/libcamera/internal/v4l2_videodevice.h\n+++ b/include/libcamera/internal/v4l2_videodevice.h\n@@ -226,8 +226,6 @@ public:\n \tvoid setDequeueTimeout(utils::Duration timeout);\n \tSignal<> dequeueTimeout;\n \n-\tstatic std::unique_ptr<V4L2VideoDevice>\n-\tfromEntityName(const MediaDevice *media, const std::string &entity);\n \tstatic std::unique_ptr<V4L2VideoDevice>\n \tfromEntityName(std::shared_ptr<const MediaDevice>, const std::string &entity);\n \ndiff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\nindex 1825e9e55ca4..643d63ea18bd 100644\n--- a/src/libcamera/v4l2_subdevice.cpp\n+++ b/src/libcamera/v4l2_subdevice.cpp\n@@ -1758,7 +1758,7 @@ const std::string &V4L2Subdevice::model()\n  * \\return A newly created V4L2Subdevice on success, nullptr otherwise\n  */\n std::unique_ptr<V4L2Subdevice>\n-V4L2Subdevice::fromEntityName(const MediaDevice *media,\n+V4L2Subdevice::fromEntityName(std::shared_ptr<const MediaDevice> media,\n \t\t\t      const std::string &entity)\n {\n \tMediaEntity *mediaEntity = media->getEntityByName(entity);\n@@ -1768,21 +1768,6 @@ V4L2Subdevice::fromEntityName(const MediaDevice *media,\n \treturn std::make_unique<V4L2Subdevice>(mediaEntity);\n }\n \n-/**\n- * \\brief Create a new video subdevice instance from \\a entity in media device\n- * \\a media\n- * \\param[in] media The media device where the entity is registered\n- * \\param[in] entity The media entity name\n- *\n- * \\return A newly created V4L2Subdevice on success, nullptr otherwise\n- */\n-std::unique_ptr<V4L2Subdevice>\n-V4L2Subdevice::fromEntityName(std::shared_ptr<const MediaDevice> media,\n-\t\t\t      const std::string &entity)\n-{\n-\treturn fromEntityName(media.get(), entity);\n-}\n-\n std::string V4L2Subdevice::logPrefix() const\n {\n \treturn \"'\" + entity_->name() + \"'\";\ndiff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\nindex 9be5cfbc0395..bb57c1b76a5b 100644\n--- a/src/libcamera/v4l2_videodevice.cpp\n+++ b/src/libcamera/v4l2_videodevice.cpp\n@@ -2104,7 +2104,7 @@ void V4L2VideoDevice::watchdogExpired()\n  * \\return A newly created V4L2VideoDevice on success, nullptr otherwise\n  */\n std::unique_ptr<V4L2VideoDevice>\n-V4L2VideoDevice::fromEntityName(const MediaDevice *media,\n+V4L2VideoDevice::fromEntityName(std::shared_ptr<const MediaDevice> media,\n \t\t\t\tconst std::string &entity)\n {\n \tMediaEntity *mediaEntity = media->getEntityByName(entity);\n@@ -2114,21 +2114,6 @@ V4L2VideoDevice::fromEntityName(const MediaDevice *media,\n \treturn std::make_unique<V4L2VideoDevice>(mediaEntity);\n }\n \n-/**\n- * \\brief Create a new video device instance from \\a entity in media device\n- * \\a media\n- * \\param[in] media The media device where the entity is registered\n- * \\param[in] entity The media entity name\n- *\n- * \\return A newly created V4L2VideoDevice on success, nullptr otherwise\n- */\n-std::unique_ptr<V4L2VideoDevice>\n-V4L2VideoDevice::fromEntityName(std::shared_ptr<const MediaDevice> media,\n-\t\t\t\tconst std::string &entity)\n-{\n-\treturn fromEntityName(media.get(), entity);\n-}\n-\n /**\n  * \\brief Convert \\a PixelFormat to a V4L2PixelFormat supported by the device\n  * \\param[in] pixelFormat The PixelFormat to convert\n",
    "prefixes": [
        "v2",
        "03/35"
    ]
}