Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp493386pxb; Fri, 3 Sep 2021 06:46:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwSp37V5EC0Ht1yvgnGKdxtKoWHMxH1FH33yWsGqDkg0QekgnYa4cLOPJhJSRuwjJHYndL X-Received: by 2002:a17:906:fa04:: with SMTP id lo4mr1118707ejb.558.1630676763876; Fri, 03 Sep 2021 06:46:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630676763; cv=none; d=google.com; s=arc-20160816; b=HSvcqpX1fLtNvhx5ik2c+lPurLX23btBRMOXrBb2ldxJSh7Po4moOz+uGpwPxfmici okrXwMLXqOiN1fbsTmXvsMVsgctmVGWXwdfVHDV93o2BfyJj9Y8WRCOD+if37xVwBj4+ c3sI/lZujpxrxpCTYr0FQjYDgA2daWk6n2J4mnLngYjpdQCa45cocy528XxoWMyPl4c9 nUDt3jLqbMZvTt6/vyUtCohr2AEQdtT/TRTlxvaWoxMiLiAR9LPeIJebzQcy7h286bPO KDHJ0ASv8rZXGKamUgJ1FMyAtbVmUCfWzOBtcbmnC2Bh2Foy3+Xtdj48vq7apqMDH3kr hvOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=PAY4kF6gwoV/YmtHZA4gYLJEXMFXlORP5uk0YEWvAUk=; b=fGBp53KdO1oC0yEMe4GdC5rX8ymAZZHZFmdNcxl5ecN90ipkdBlt6VqjaLuxpcHSmk ZLsUHLbIMQxwx7Vnt9j11/ikqp5VLPSmQQhVNw26wk9+NX22WxKQt05CtlF5LhP42eY/ cCJSoagRIYKOAFtCOHsUIYzIBit9m+R5hRBFqQO5sQjg7/BeNsnX+roXOvVAL+m/lVmQ 0vLttsVsCdR+bTXo7MDpHZA4lDLiSTcIl7V15Mm4tJ2cHgmO/w2kdobENY2SKwKA548v EIVizTrqdmuwlUyLmQc4Ziukms559logdKh2zvFhk83nmlH3a8b0oNZ08WuPOluOwCSO PU0A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id e10si5839272edz.215.2021.09.03.06.45.35; Fri, 03 Sep 2021 06:46:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S235786AbhICNlc (ORCPT + 99 others); Fri, 3 Sep 2021 09:41:32 -0400 Received: from mga11.intel.com ([192.55.52.93]:32026 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235128AbhICNla (ORCPT ); Fri, 3 Sep 2021 09:41:30 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10095"; a="216283921" X-IronPort-AV: E=Sophos;i="5.85,265,1624345200"; d="scan'208";a="216283921" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Sep 2021 06:40:20 -0700 X-IronPort-AV: E=Sophos;i="5.85,265,1624345200"; d="scan'208";a="477223512" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Sep 2021 06:40:18 -0700 Received: from andy by smile with local (Exim 4.95-RC2) (envelope-from ) id 1mM9QV-00HDPF-KO; Fri, 03 Sep 2021 16:40:15 +0300 Date: Fri, 3 Sep 2021 16:40:15 +0300 From: Andy Shevchenko To: Alexandru Ardelean Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, jic23@kernel.org, hdegoede@redhat.com, wens@csie.org Subject: Re: [PATCH 1/5] iio: inkern: introduce devm_iio_map_array_register() short-hand function Message-ID: References: <20210903072917.45769-1-aardelean@deviqon.com> <20210903072917.45769-2-aardelean@deviqon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210903072917.45769-2-aardelean@deviqon.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 03, 2021 at 10:29:13AM +0300, Alexandru Ardelean wrote: > This change introduces a device-managed variant to the > iio_map_array_register() function. It's a simple implementation of calling > iio_map_array_register() and registering a callback to > iio_map_array_unregister() with the devm_add_action_or_reset(). > > The function uses an explicit 'dev' parameter to bind the unwinding to. It > could have been implemented to implicitly use the parent of the IIO device, > however it shouldn't be too expensive to callers to just specify to which > device object to bind this unwind call. > It would make the API a bit more flexible. AFAIU this dev pointer is kinda discussable thing. What scenario do you expect (have in mind) when it shouldn't use parent? -- With Best Regards, Andy Shevchenko