From patchwork Fri Sep 23 09:42:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 609301 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0C19ECAAD8 for ; Fri, 23 Sep 2022 09:43:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231995AbiIWJn0 (ORCPT ); Fri, 23 Sep 2022 05:43:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231862AbiIWJm5 (ORCPT ); Fri, 23 Sep 2022 05:42:57 -0400 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B4D5F184A for ; Fri, 23 Sep 2022 02:42:35 -0700 (PDT) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20220923094233euoutp02395ffda64f933eb579d4f23d57bcab13~XdAVmYwp40866908669euoutp02g for ; Fri, 23 Sep 2022 09:42:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20220923094233euoutp02395ffda64f933eb579d4f23d57bcab13~XdAVmYwp40866908669euoutp02g DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1663926153; bh=3N/10Z3eYKa4uqUpmb2xmKRNSg6VSTYifd8bIQi9eew=; h=From:To:Cc:Subject:Date:References:From; b=ZBHQdoXApxt6MSU+moFpFzKOQPnhc5C5ysh67TmEB+qAEa/PVNZEO7xTv+/vBET3A /jY+0O+kBB/38pgVQU/odLyXq7JZmhoSQ6EooUkScgTlcRiBfZaUIbJdRiZltsVdCs PEGeLcpnjn/NK7aLxsqLMi+kz6tY5MaAVxOCvcY0= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20220923094233eucas1p12d158b8fe9f94a507479071895ed5465~XdAU_axMQ0230902309eucas1p1M; Fri, 23 Sep 2022 09:42:33 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 8A.09.19378.98F7D236; Fri, 23 Sep 2022 10:42:33 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20220923094232eucas1p1deb3985c9637a0876609c75967175e9b~XdAUj3bcK3070430704eucas1p1A; Fri, 23 Sep 2022 09:42:32 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220923094232eusmtrp2e3614e1a98beb959b984a7579ca68817~XdAUjN1rJ2354823548eusmtrp2s; Fri, 23 Sep 2022 09:42:32 +0000 (GMT) X-AuditID: cbfec7f5-a4dff70000014bb2-58-632d7f893357 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id AF.7F.07473.88F7D236; Fri, 23 Sep 2022 10:42:32 +0100 (BST) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20220923094232eusmtip2025fc5ded37ac99d53a56e04e2ab8dda~XdAUHF7Zn0306903069eusmtip2M; Fri, 23 Sep 2022 09:42:32 +0000 (GMT) From: Marek Szyprowski To: linux-media@vger.kernel.org, 'Linux Samsung SOC' Cc: Marek Szyprowski , Sylwester Nawrocki , Daniel Scally , Sakari Ailus , Laurent Pinchart Subject: [PATCH] media: exynos4-is: don't rely on the v4l2_async_subdev internals Date: Fri, 23 Sep 2022 11:42:01 +0200 Message-Id: <20220923094201.18047-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrIIsWRmVeSWpSXmKPExsWy7djPc7qd9brJBh+msFpsO/yO1aJz4hJ2 i54NW1ktZpzfx2Sx9shddovDb9pZLc7sX8nmwO6xc9Zddo/ZHTNZPQ5/Xcji0bdlFaPH501y AaxRXDYpqTmZZalF+nYJXBknOl6yFDzmrli5u7qBsYOri5GTQ0LARGLb4afMXYxcHEICKxgl lrVdYIRwvjBK3DpxjgXC+cwocaeziwWmZWLzalaIxHJGiX/f/rEgtKxqZAKpYhMwlOh628UG YosIREk83HKFGcRmFrjPKPHitCqILSwQLPH92XZ2EJtFQFXifFcT0G4ODl4BW4lbGwUhlslL rN5wAOw+CYG/7BKLNv1ihki4SGx6eIoNwhaWeHV8CzuELSPxf+d8JoiGdkaJBb/vQzkTGCUa nt9ihKiylrhz7hcbyDZmAU2J9bv0IcKOEl1zVzGDhCUE+CRuvBWEuJlPYtK26VBhXomONiGI ajWJWcfXwa09eOES1GkeEue7v4OdJiQQK3Gscx7bBEa5WQi7FjAyrmIUTy0tzk1PLTbOSy3X K07MLS7NS9dLzs/dxAhMBaf/Hf+6g3HFq496hxiZOBgPMUpwMCuJ8M6+o5ksxJuSWFmVWpQf X1Sak1p8iFGag0VJnJdthlaykEB6YklqdmpqQWoRTJaJg1OqgWm1pIm96b5pblPVencs23Uo c0rOhUM7uBUXugeGBDUvfnsqjuvBIS6v6UxGjVLr/WekrxDed6Bp9d6arZeWz6yfXH9m9vL+ onNPq3bmvDwve3ZzcNTkmRXajBNfL3VIf5NatpzVS/3kB7kmr+vGE3ZeZajjY1n7PsrGLkph H7/DV/XFUoV5k2NqNc+qvdtc7FblmiY7i6//7a2+CKmZ+wqmtB/NDVM18vusUPb70KFld76s DNT4eDVZIavDWMSq25b/kuH3ryH80xjE2CNLVUw8F13Z9P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ID: 20220923094232eucas1p1deb3985c9637a0876609c75967175e9b X-Msg-Generator: CA X-RootMTR: 20220923094232eucas1p1deb3985c9637a0876609c75967175e9b X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20220923094232eucas1p1deb3985c9637a0876609c75967175e9b References: Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Commit 1f391df44607 ("media: v4l2-async: Use endpoints in __v4l2_async_nf_add_fwnode_remote()") changed the data that is stored in the v4l2_async_subdev internals from the fwnode pointer to the parent device to the fwnode pointer to the matched endpoint. This broke the sensor matching code, which relied on the particular fwnode data in the v4l2_async_subdev internals. Fix this by simply matching the v4l2_async_subdev pointer, which is already available there. Reported-by: Daniel Scally Fixes: fa91f1056f17 ("[media] exynos4-is: Add support for asynchronous subdevices registration") Signed-off-by: Marek Szyprowski Reviewed-by: Sylwester Nawrocki --- drivers/media/platform/samsung/exynos4-is/media-dev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/platform/samsung/exynos4-is/media-dev.c b/drivers/media/platform/samsung/exynos4-is/media-dev.c index 52b43ea04030..412213b0c384 100644 --- a/drivers/media/platform/samsung/exynos4-is/media-dev.c +++ b/drivers/media/platform/samsung/exynos4-is/media-dev.c @@ -1380,9 +1380,7 @@ static int subdev_notifier_bound(struct v4l2_async_notifier *notifier, /* Find platform data for this sensor subdev */ for (i = 0; i < ARRAY_SIZE(fmd->sensor); i++) - if (fmd->sensor[i].asd && - fmd->sensor[i].asd->match.fwnode == - of_fwnode_handle(subdev->dev->of_node)) + if (fmd->sensor[i].asd == asd) si = &fmd->sensor[i]; if (si == NULL)