Received: by 10.192.165.148 with SMTP id m20csp4539594imm; Tue, 24 Apr 2018 04:37:32 -0700 (PDT) X-Google-Smtp-Source: AIpwx49evI8c/KTY/kRp0COLdzsQMVQFb5vAkIzFUL7EeL0nc32SXYJYJQ0r/v9vf28TZ/uZqzRS X-Received: by 2002:a17:902:5304:: with SMTP id b4-v6mr12879716pli.231.1524569852055; Tue, 24 Apr 2018 04:37:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524569852; cv=none; d=google.com; s=arc-20160816; b=Wf0knc+DBvVirp47G2EmaejJIDV4ftwTQ+vmZ+p7nEREPhZ9GFvQUm7sTSGLBTdHu0 feU8hWFmMJi3bYJNXDl5qkcp93N9puVBv8kNnFr/uWIGcS+hySi4fx7ptqx0/v9zWINI Fwuoc0jxY/ZV040z9Ucpdj972DCjPDqKFepQnVNl3plkqN90D6v6QOJsQ5zE/Z+vG0m1 xVdAOukUnmv0EJCy6j1RZA9RbsloOt+nPwEhuT+mcXZC9ArKKyodwegtT5aYGMt8Wh/G bM4j1CHluqMURww9LE85PbB1BQSIVyFy4QdR9D+GR1voAPt0GcdZB6vb5W0c9S3yVqoK kOqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=TdJ85i2bvFEUMpYYeD7HBVIuvW0oIfI8tjG2xLf1WQY=; b=JuehH8pblAefqCgkBGw9M3g2YqHhPqULIYFtcG5ZQu76qRXILsJbK/a+RZf0N8g+0j Tdpi9XYGQMByeyYw/ockQF6KBPqLFsvcVeUEuHgxqmZ7P5gy8lpILLVvwkv07iop0Ru2 HYkyGzPXVZfDZNVoGczlBh1PxPKJsmEJqON25q3mMRAZ/cBy7DojyDhjQ7834j+QU6jP yXWBhh7JfylxP9mFcz1cTMF+loPoeV3tDiD/vkh9R4URjUIParkqprJPSe3QuxJBszX1 LXipWD9Q99TwKXjDKUOxFgpR6lgrNAS04ssdmgUVpdrQiU7fQyVg65+cDGoCYi3OHYHZ S4AA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y22si1787527pfn.303.2018.04.24.04.37.17; Tue, 24 Apr 2018 04:37:32 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756220AbeDXKvQ (ORCPT + 99 others); Tue, 24 Apr 2018 06:51:16 -0400 Received: from bert.emutex.com ([91.103.1.109]:54379 "EHLO bert.emutex.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755273AbeDXKvN (ORCPT ); Tue, 24 Apr 2018 06:51:13 -0400 Received: from [92.51.199.138] (helo=statler.emutex.com) by bert.emutex.com with esmtp (Exim 4.84) (envelope-from ) id 1fAvY3-0008Ft-Pi; Tue, 24 Apr 2018 11:51:47 +0100 Received: from 182.red-79-157-43.dynamicip.rima-tde.net ([79.157.43.182] helo=localhost) by statler.emutex.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84) (envelope-from ) id 1fAvXP-00057H-CJ; Tue, 24 Apr 2018 11:51:07 +0100 Date: Tue, 24 Apr 2018 11:51:06 +0100 From: Javier Arteaga To: Andy Shevchenko Cc: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Dan O'Donovan , linux-iio@vger.kernel.org, Linux Kernel Mailing List , Nicola Lunghi Subject: Re: [PATCH v2 2/3] iio: adc128s052: add ACPI _HID AANT1280 Message-ID: <20180424105106.33efoxuhizcxcz5e@localhost> References: <20180423213805.12591-1-javier@emutex.com> <20180423213805.12591-3-javier@emutex.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Score: -1.0 (-) X-Spam-Report: Spam detection software, running on the system "statler.emutex.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi Andy, On Tue, Apr 24, 2018 at 01:08:31AM +0300, Andy Shevchenko wrote: > > + if (ACPI_COMPANION(&spi->dev)) { > > > + const struct acpi_device_id *ad_id; > > + > > + ad_id = acpi_match_device(spi->dev.driver->acpi_match_table, > > + &spi->dev); > > + if (!ad_id) > > + return -ENODEV; > > + > > + config = ad_id->driver_data; > > There is a new API to get it by one call. > https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git/commit/?id=b283f157611f129f5bbbf7d06f5af860d76797fd [...] Content analysis details: (-1.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andy, On Tue, Apr 24, 2018 at 01:08:31AM +0300, Andy Shevchenko wrote: > > + if (ACPI_COMPANION(&spi->dev)) { > > > + const struct acpi_device_id *ad_id; > > + > > + ad_id = acpi_match_device(spi->dev.driver->acpi_match_table, > > + &spi->dev); > > + if (!ad_id) > > + return -ENODEV; > > + > > + config = ad_id->driver_data; > > There is a new API to get it by one call. > https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git/commit/?id=b283f157611f129f5bbbf7d06f5af860d76797fd That looks much cleaner. Will do for a v3. Thank you!