Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2422928pxu; Fri, 18 Dec 2020 12:55:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJzYlSbfLkXQxHWTN1yJ3g5Mv97THxfTr1Wdv9cUYRZlKnhvTNgW5pgJdt89rYfeJCqhLVZW X-Received: by 2002:a17:906:a415:: with SMTP id l21mr5788696ejz.2.1608324928407; Fri, 18 Dec 2020 12:55:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608324928; cv=none; d=google.com; s=arc-20160816; b=KZYlJLcO3u3ZgtkigxumTYVO1xLnQdGYczpXIt7OLK0eXPYuGz+lfLCvsA2hjARAXd CQDpoO571R5jooghAOdQmIwGZEfpDiEld5V5QIt+n00YaGOKyTL+FWGsDVpc+AsGHgqJ k23tdqcbmgCA63UAQv0HhSTh4PwCN0CvdrTB9SH62az8wZR8/r+IDsy0O1CYZX9Y6ia0 CTEmd3E+2Adsbzd8PpT4W9z2lDJfIiuhwIqmbSW6twd76j7L6RURl/89vdqhpANsa/Ml 7hZQ75KCFWS+N985oW7YBHiIVo7LSm8GLp8MpZWyxFxJ1SzZogKnPy258R64xKZrYFe8 dqLw== 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 :ironport-sdr:ironport-sdr; bh=qcaVq+qdBQJ/ZI3KEmOe89eRkWLyvHHMPqE/UCXVXv8=; b=Ozu5XkccmEXsLmUTs3/1mUAeS8C0SGb9XySD7G4TqxY7jHxe8cmnfibIhZW7x1EQ6t F+LxG58U1qdLn0t5N7dz5ivqAlrOLc3jN0vdoqyQG1Qa9ThSO0DZR439mFeIr9O3eIEd 9QqgarNAiUADpLXVEfFGuOREk2pmpOyJh827eWJRTAbv5y3imPPJFbc0f4P3RUKLEx8A N9eA+sJ+O8aSny1/ml5Yiig05lBEt/PbwvlH/8mwRBZN+G3xoB3rMgVcvpScC32TYFKw GkKljlwNFFmW6IRlf+2xgLkWZKvrx/d/dj/tYiGkZySXrn/XwOEiz11u26rrzlZIfPpB jTpw== 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 z5si4936939ejj.549.2020.12.18.12.55.06; Fri, 18 Dec 2020 12:55:28 -0800 (PST) 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 S1728304AbgLRUnu (ORCPT + 99 others); Fri, 18 Dec 2020 15:43:50 -0500 Received: from mga02.intel.com ([134.134.136.20]:47247 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726175AbgLRUnu (ORCPT ); Fri, 18 Dec 2020 15:43:50 -0500 IronPort-SDR: 4yoi1/gAbaJHGqT98AV8MaafVFW3+lve17xIs0J7DNhST8TQlvLT0xxo43P6D/C0z+gAGkvnDh g8vwIBd4KcEw== X-IronPort-AV: E=McAfee;i="6000,8403,9839"; a="162552756" X-IronPort-AV: E=Sophos;i="5.78,431,1599548400"; d="scan'208";a="162552756" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Dec 2020 12:42:04 -0800 IronPort-SDR: FGMcq3QwsCmxzmDQpIJ5sd/3kNP9SatPg7WSJ33jbWB4qo7dN9OfynKOquzgHyb8G6C2gzA/2X IzhuunNVfphA== X-IronPort-AV: E=Sophos;i="5.78,431,1599548400"; d="scan'208";a="489926367" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Dec 2020 12:41:56 -0800 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1kqMaX-00FgPF-7Z; Fri, 18 Dec 2020 22:42:57 +0200 Date: Fri, 18 Dec 2020 22:42:57 +0200 From: Andy Shevchenko To: Daniel Scally Cc: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-media@vger.kernel.org, devel@acpica.org, rjw@rjwysocki.net, lenb@kernel.org, gregkh@linuxfoundation.org, yong.zhi@intel.com, sakari.ailus@linux.intel.com, bingbu.cao@intel.com, tian.shu.qiu@intel.com, mchehab@kernel.org, robert.moore@intel.com, erik.kaneda@intel.com, pmladek@suse.com, rostedt@goodmis.org, sergey.senozhatsky@gmail.com, linux@rasmusvillemoes.dk, laurent.pinchart+renesas@ideasonboard.com, jacopo+renesas@jmondi.org, kieran.bingham+renesas@ideasonboard.com, linus.walleij@linaro.org, heikki.krogerus@linux.intel.com, kitakar@gmail.com, jorhand@linux.microsoft.com Subject: Re: [PATCH v2 11/12] acpi: Add acpi_dev_get_next_match_dev() and helper macro Message-ID: <20201218204257.GD4077@smile.fi.intel.com> References: <20201217234337.1983732-1-djrscally@gmail.com> <20201217234337.1983732-12-djrscally@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201217234337.1983732-12-djrscally@gmail.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 Thu, Dec 17, 2020 at 11:43:36PM +0000, Daniel Scally wrote: > To ensure we handle situations in which multiple sensors of the same > model (and therefore _HID) are present in a system, we need to be able > to iterate over devices matching a known _HID but unknown _UID and _HRV > - add acpi_dev_get_next_match_dev() to accommodate that possibility and > change acpi_dev_get_first_match_dev() to simply call the new function > with a NULL starting point. Add an iterator macro for convenience. ... > - * acpi_dev_get_first_match_dev - Return the first match of ACPI device > + * acpi_dev_get_next_match_dev - Return the next match of ACPI device > + * @adev: Pointer to the previous acpi_device matching this hid, uid and hrv A nit: @hid, @uid and @hrv > * @hid: Hardware ID of the device. > * @uid: Unique ID of the device, pass NULL to not check _UID > * @hrv: Hardware Revision of the device, pass -1 to not check _HRV -- With Best Regards, Andy Shevchenko