From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F465C4361B for ; Fri, 18 Dec 2020 20:43:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CD6A923B70 for ; Fri, 18 Dec 2020 20:43:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726187AbgLRUnu (ORCPT ); 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-acpi@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