Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1333422imu; Tue, 20 Nov 2018 16:00:56 -0800 (PST) X-Google-Smtp-Source: AJdET5e/v6r9uY3NKaqx6kQm2+avEIUspNFUUvz3N7EbJS0GeeX8JYFG4kJRi1+WmbWjyUZj75ly X-Received: by 2002:a62:6a88:: with SMTP id f130mr4427367pfc.201.1542758456114; Tue, 20 Nov 2018 16:00:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542758456; cv=none; d=google.com; s=arc-20160816; b=gvRA9JJ62dHr9Ivs/dzySYN/Jz+tK6BD4h3iu0H/RkwZO9xifJWpTt4JHBSWY0qOBZ V8n7OJE7imC3DXWUTd/OcfDN/WHnEvB+ttRX29Hd5IQRM/2DgW+d4lxhd6n1FY8rgDEg ScYymTYcrKJ9CNdjXiZDFGkpzMIxzdnvVx6G6LSSvjVotnS03ywW8G13hLET0uIf3QXA 0/CyOfzIzHUn8/hSrZrgZbuzW9WgnvefGOVfIY33wARhBWj78GmOpeWfcf1aGcOq/8mo mFiiZ6mk6z5YrWbVqCF2UTyJtpLiI7uT+5nn00gboGNwamK5UcCYya6IdOZj3dE1Vw4X xmSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=K+V8ZvX/sE2Ng9LqVg+JXWQvvuhFQ9PTiXLdWDFcD8c=; b=aQZHdQxt4FzoTCIZv/Oa8XGcr9bvfgyrN/wGTX2KO9M9kntbE8aXwO4CBh8Pj67/+b sQIjT7AVSWLEz2noji1YbpVyRNRT8g8bmoGluq3V7W8xaOt74818QxvzbpFxzuZj9ZVx Nh9TmIIllm2lqTBEZVpvIBNEw2mDeeI4dhiL/DxwAZudJ4v7IKpQ0/NoOJcFdxpFGRdG qTwULx+hxTVwJLQFq2VaoNuFmDlN1WtoFyBHyMrtXYuVnM4IVhu5pXkKvK1zl/kQNhUm I4bsl9DpsYQdOMrhJBCDyCWr5qDSZj5P80ct+qDUsoaiJlU85c1yMMmmAuE6SR6poa2E zGcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@usp-br.20150623.gappssmtp.com header.s=20150623 header.b=t073I0FZ; 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=usp.br Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r28si40974049pgm.317.2018.11.20.16.00.40; Tue, 20 Nov 2018 16:00:56 -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; dkim=pass header.i=@usp-br.20150623.gappssmtp.com header.s=20150623 header.b=t073I0FZ; 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=usp.br Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726823AbeKUKbV (ORCPT + 99 others); Wed, 21 Nov 2018 05:31:21 -0500 Received: from mail-it1-f194.google.com ([209.85.166.194]:33423 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726477AbeKUKbV (ORCPT ); Wed, 21 Nov 2018 05:31:21 -0500 Received: by mail-it1-f194.google.com with SMTP id p11-v6so11335115itf.0 for ; Tue, 20 Nov 2018 15:59:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=usp-br.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=K+V8ZvX/sE2Ng9LqVg+JXWQvvuhFQ9PTiXLdWDFcD8c=; b=t073I0FZfj2yeINs0TRymIP7q2dIjQjw9Uz/efim4RplqG6U5TD41wX6eso12B4mPJ yS3IeppdR6YpKrNE6DkmmkrOm+lQAjhciFUQMUZFVWaIUrQOiVV0X1nlL1pSjwKZBwnh 6oHtZQu4QHKopazQPEfpbKGkdXvFoYe7/fxdmEuK56jvhp1OaYgouWCkJpuhz0cm9xZc GP6GE1DCkOiQCxdiqx3sRcxc/4MpMrLLxubr4cQnSBdskrkKa4MnSPOE6sZeRMi56cHY JNKtVF3QZ2iJlWevmNLNcY0AoxLXaOMy9AGmo+8lDute0cr7ZtjzuVZNEqsyelek8bXB gYww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=K+V8ZvX/sE2Ng9LqVg+JXWQvvuhFQ9PTiXLdWDFcD8c=; b=G5LJaYYewaJQ7wt/wf205chciRiA/E2Hw7RGlxChgd9pHWrVtrrsoyGhTQrJVQ4FKs V1G0Oj2TRXb5x1L02d8XhAnASkMznzehbS9qUVpyo3r8QYfUgdx6B7MiKuQIEH89XqTF MEdk/DaCv+dllTRWuVfYS6+PlFOT1P5WuuXLY6sUpQBXVjDGeeHqzHH/fO3Kv6QI/Ciw cHpfXSfJsQ7cUu9/+sHEVgdCNrY1MEXafhlqSJGduCsSEmBQQC3yogiGrTFsBLw3WKyF Wf0HzvtsAIiDtRDqUUFQo4H2exBYOEBQyBB/kSQfI7uNsVnAHksiJ5w779EdlNRam5Gl X7Ag== X-Gm-Message-State: AA+aEWb669iYXUf42KQ3fxuItqBxRnk11PlrGt1CkkKxAels4vnE7iP2 eRt2drcmU3DEHs5BUPZ1QdgNd8WBVEE8LCvtjGEhEQ== X-Received: by 2002:a24:338e:: with SMTP id k136-v6mr3635534itk.86.1542758371997; Tue, 20 Nov 2018 15:59:31 -0800 (PST) MIME-Version: 1.0 References: <20181118042540.12697-1-matheus.bernardino@usp.br> <20181118042540.12697-2-matheus.bernardino@usp.br> In-Reply-To: From: Matheus Tavares Bernardino Date: Tue, 20 Nov 2018 21:59:19 -0200 Message-ID: Subject: Re: [PATCH v2 1/7] staging:iio:ad2s90: Add device tree support To: Alexandru Ardelean Cc: Lars-Peter Clausen , Rob Herring , Hartmut Knaack , Jonathan Cameron , Michael Hennerich , Mark Rutland , Peter Meerwald-Stadler , Greg Kroah-Hartman , Victor Colombo , linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, kernel-usp@googlegroups.com, devicetree@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 19, 2018 at 6:09 AM Ardelean, Alexandru wrote: > > On Sun, 2018-11-18 at 02:25 -0200, Matheus Tavares wrote: > > This patch adds device tree support to ad2s90 with standard > > device tree id table. > > > > Hey, > > Comment inline > > > Signed-off-by: Matheus Tavares > > --- > > Changes in v2: > > - none > > > > drivers/staging/iio/resolver/ad2s90.c | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/drivers/staging/iio/resolver/ad2s90.c > > b/drivers/staging/iio/resolver/ad2s90.c > > index 3e257ac46f7a..6ffbac66b837 100644 > > --- a/drivers/staging/iio/resolver/ad2s90.c > > +++ b/drivers/staging/iio/resolver/ad2s90.c > > @@ -107,6 +107,12 @@ static int ad2s90_probe(struct spi_device *spi) > > return devm_iio_device_register(indio_dev->dev.parent, indio_dev); > > } > > > > +static const struct of_device_id ad2s90_of_match[] = { > > + { .compatible = "adi,ad2s90", }, > > + {} > > +}; > > +MODULE_DEVICE_TABLE(of, ad2s90_of_match); > > + > > static const struct spi_device_id ad2s90_id[] = { > > { "ad2s90" }, > > {} > > @@ -116,6 +122,7 @@ MODULE_DEVICE_TABLE(spi, ad2s90_id); > > static struct spi_driver ad2s90_driver = { > > .driver = { > > .name = "ad2s90", > > + .of_match_table = of_match_ptr(ad2s90_of_match), > > I think you need to remove the of_match_ptr(). > There was a comment from Jonathan on another thread about this. > See: > https://patchwork.kernel.org/patch/10682963/ > Hm, got it, thanks! I don't understand much about ACPI yet, and I had understood the "of_match_ptr" as a guard. Could someone point me in which cases it should be used? Or is it obsolete? Matheus > So, > + .of_match_table = of_match_ptr(ad2s90_of_match), > > becomes > > + .of_match_table = ad2s90_of_match, > > > }, > > .probe = ad2s90_probe, > > .id_table = ad2s90_id, > > -- > You received this message because you are subscribed to the Google Groups "Kernel USP" group. > To unsubscribe from this group and stop receiving emails from it, send an email to kernel-usp+unsubscribe@googlegroups.com. > To post to this group, send email to kernel-usp@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/kernel-usp/f250fa3a01b51d59979e7a2e3e42cc34d02aa52e.camel%40analog.com. > For more options, visit https://groups.google.com/d/optout.