Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3780648ybv; Tue, 25 Feb 2020 07:11:59 -0800 (PST) X-Google-Smtp-Source: APXvYqz+O4FhZBdatkuan4sa+OGNSAE6277Vx0sG1+QBPHzupHBi5raXhTobSwCIw5iQ6svUh7dY X-Received: by 2002:a54:4895:: with SMTP id r21mr4085188oic.107.1582643519136; Tue, 25 Feb 2020 07:11:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582643519; cv=none; d=google.com; s=arc-20160816; b=xYTBNyZOElwmuOCFH5HghzOfU0H0Sf1MOl7TfdjUPbvIYAL40AR/b3z0oK/LLVwVAR KMqOBhUxGVDzhx8XXCkfN1RXltil0PQmylfKnv0Kx1Bt/MUjK2anSp+wdhLmf6YzH9vK Kx+x3WLaWzl7DolOXQk7WSWV1hdIGWMwGrHvrno3w3hXPiASQGot3LImR4pHauTxkc80 YN4rS9ezliOywDAV1gmGpwGRD2zsIy/88uU0cvEnqKvDTwXRQmUtf1T7ALxiapM/LBdf en0T0P1k3RrOz+5gNOKB0ZMWnQ8AAk48Py1WxPzY2EtbJ8r5hZCyMby7BVM7n1pkbQBb wGBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=EBIt/hMIyNeuM4W8nsIBzJdW42dXi/l1uzEwWbSVU7E=; b=uqnWKcq95NGsLu2GCUhYm2fqB9EGXzQD8PvD+X8GkBAaz9ZJqNoJrP8Q1gL3eEU7mU taopHXjdDwmmwV3jDPMWd9tvjNUzrPnbS8/W2q/TwH+exlXt8pu+gqzYGLWWBLWoBL3u iD5MHFDHVSUNO0ZSmtV8+wQALv9MqhLXJ0Axgo0HtKg6aWzY2HRMtcGQpMrcVdAJU79h iO/mUrnBPk8g1hIad/OQRE8ZyPX77KgXau2yJ0ycLy1nQoCzVh06zmFRazRWfy2qf5CR BKh6GE2/u8rjxb6ki/oPZdacVKlVzoqYQXZnSeuUig8rTUa4Scd1hfqZWeVFnjC2Sq8S OscA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x2si6978225oie.56.2020.02.25.07.11.41; Tue, 25 Feb 2020 07:11:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730875AbgBYPH1 (ORCPT + 99 others); Tue, 25 Feb 2020 10:07:27 -0500 Received: from mga05.intel.com ([192.55.52.43]:24506 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729510AbgBYPH1 (ORCPT ); Tue, 25 Feb 2020 10:07:27 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Feb 2020 07:07:27 -0800 X-IronPort-AV: E=Sophos;i="5.70,484,1574150400"; d="scan'208";a="284693145" Received: from paasikivi.fi.intel.com ([10.237.72.42]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Feb 2020 07:07:22 -0800 Received: by paasikivi.fi.intel.com (Postfix, from userid 1000) id 39A9D2089D; Tue, 25 Feb 2020 17:07:21 +0200 (EET) Date: Tue, 25 Feb 2020 17:07:21 +0200 From: Sakari Ailus To: Steve Longerbeam Cc: linux-media@vger.kernel.org, Philipp Zabel , Mauro Carvalho Chehab , Greg Kroah-Hartman , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Rui Miguel Silva , Thomas Gleixner , Hans Verkuil , open list , "open list:STAGING SUBSYSTEM" , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" Subject: Re: [RESEND PATCH v3 02/17] media: v4l2-fwnode: Pass notifier to v4l2_async_register_fwnode_subdev() Message-ID: <20200225150721.GO5379@paasikivi.fi.intel.com> References: <20200215194136.10131-1-slongerbeam@gmail.com> <20200215194136.10131-3-slongerbeam@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200215194136.10131-3-slongerbeam@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Steve, On Sat, Feb 15, 2020 at 11:41:21AM -0800, Steve Longerbeam wrote: > Instead of allocating a notifier in v4l2_async_register_fwnode_subdev(), > have the caller provide one. This allows the caller to implement > notifier ops (bind, unbind). > > The caller is now responsible for first initializing its notifier with a > call to v4l2_async_notifier_init(). > > Signed-off-by: Steve Longerbeam Instead of improving v4l2_async_register_fwnode_subdev(), could you convert the users (IMX driver in this case) to call the preferred APIs instead? As the lines below show, v4l2_async_register_fwnode_subdev() has only two users left --- the other one of which is the IMX driver. After converting these two, we could just remove this API. See e.g. drivers/media/pci/intel/ipu3/ipu3-cio2.c and drivers/media/platform/omap3isp/isp.c for examples. > --- > Changes in v3: > - added the missing calls to unregister/cleanup the new subdev notifiers. > Reported by Rui Silva. > --- > drivers/media/platform/video-mux.c | 8 +++++++- > drivers/media/v4l2-core/v4l2-fwnode.c | 11 +---------- > drivers/staging/media/imx/imx6-mipi-csi2.c | 7 ++++++- > drivers/staging/media/imx/imx7-media-csi.c | 7 ++++++- > drivers/staging/media/imx/imx7-mipi-csis.c | 9 ++++++++- > include/media/v4l2-fwnode.h | 12 ++++++++---- > 6 files changed, 36 insertions(+), 18 deletions(-) -- Kind regards, Sakari Ailus