From patchwork Thu Mar 30 11:58:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 90915 X-Patchwork-Delegate: sakari.ailus@iki.fi Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from ) id 1phqwE-009eE5-UA; Thu, 30 Mar 2023 11:59:31 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231151AbjC3L7Z (ORCPT + 1 other); Thu, 30 Mar 2023 07:59:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231599AbjC3L7V (ORCPT ); Thu, 30 Mar 2023 07:59:21 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37088A5C6 for ; Thu, 30 Mar 2023 04:59:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680177560; x=1711713560; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QnYr+GdHWgEC8Ufdp0MbAqGXIwoveyexkk4PM4EYNqY=; b=GYF/t3x+mAXuaAUnMojN+QrbTrW3SWDcmb0aaCGR7W0+j985izgHIjNM WbtlXe6ivKwaxKxXTlxWXUzjcURPPN723z5a/ODPYlX5fnnE19nhDbFjU E7eWI9Prv+4992ABshnTAnct8pTuZG7DGLP6tra3JLv24pYj9tnFdYUoP 6EcNkjlZ9gqGq5IjaTGYi3dpoyeifeVBelhlmpt9DKPI+Ha9oLHE/v1sB LKga1sVd2HQ+wG9e9Kk4ftY4s0iinmhxwzHOjIX4qjaJa4U1wklUuIBcq SANGZAUMlU2GsgpheQrOhq4F0z64c4PkHbqF2h7pUTS/17ch2RII7dstP Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10664"; a="406111481" X-IronPort-AV: E=Sophos;i="5.98,303,1673942400"; d="scan'208";a="406111481" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2023 04:59:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10664"; a="714952932" X-IronPort-AV: E=Sophos;i="5.98,303,1673942400"; d="scan'208";a="714952932" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2023 04:59:16 -0700 Received: from svinhufvud.ger.corp.intel.com (localhost [IPv6:::1]) by kekkonen.fi.intel.com (Postfix) with ESMTP id BAD1712259B; Thu, 30 Mar 2023 14:59:13 +0300 (EEST) From: Sakari Ailus To: linux-media@vger.kernel.org Cc: Philipp Zabel , Laurent Pinchart , hverkuil@xs4all.nl, Francesco Dolcini , aishwarya.kothari@toradex.com, Robert Foss , Todor Tomov , Hyun Kwon Subject: [PATCH 14/18] media: xilinx-vipp: Init async notifier after registering V4L2 device Date: Thu, 30 Mar 2023 14:58:49 +0300 Message-Id: <20230330115853.1628216-15-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230330115853.1628216-1-sakari.ailus@linux.intel.com> References: <20230330115853.1628216-1-sakari.ailus@linux.intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -2.4 (--) X-LSpam-Report: No, score=-2.4 required=5.0 tests=BAYES_00=-1.9,DKIMWL_WL_HIGH=0.001,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1 autolearn=ham autolearn_force=no Initialise the V4L2 async notifier after registering the V4L2 device, just before parsing DT for async sub-devices. This way struct device is available to the notifier right from the beginning. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart --- drivers/media/platform/xilinx/xilinx-vipp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c index 70e7a1f6ed3b..83430633ed28 100644 --- a/drivers/media/platform/xilinx/xilinx-vipp.c +++ b/drivers/media/platform/xilinx/xilinx-vipp.c @@ -516,6 +516,8 @@ static int xvip_graph_init(struct xvip_composite_device *xdev) goto done; } + v4l2_async_nf_init(&xdev->notifier); + /* Parse the graph to extract a list of subdevice DT nodes. */ ret = xvip_graph_parse(xdev); if (ret < 0) { @@ -596,7 +598,6 @@ static int xvip_composite_probe(struct platform_device *pdev) xdev->dev = &pdev->dev; INIT_LIST_HEAD(&xdev->dmas); - v4l2_async_nf_init(&xdev->notifier); ret = xvip_composite_v4l2_init(xdev); if (ret < 0)