Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3391516imw; Mon, 11 Jul 2022 07:50:42 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tiIOmwKK3iaKA+IO/yG0RYyj7TAZ0TZRqIpz4Bkchug+UL6XBwTgxVx8OHLN0pxd140Mqr X-Received: by 2002:a17:906:8479:b0:72a:5610:f151 with SMTP id hx25-20020a170906847900b0072a5610f151mr18687470ejc.125.1657551042041; Mon, 11 Jul 2022 07:50:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657551042; cv=none; d=google.com; s=arc-20160816; b=vu33DyhgfylzzGbLBJc3h1pR18Cbf7rVrf+mX/tltcJ5vUB7uVlHZt1F2Ve2y3XbfV X7aKsOGCt/qg7U5y9HZVLBCdahmPfoSq5myI6e6LJtTuFWtiM8/zC9zNBK766acQDvcb Lgx4eZddQEy0D0k6JZiS0wm+gvp2j65Hbly06jcUAoTH9cnstsIYOEhjeogxiO/o6xAG wr1a1PvldT8XUCvVXJFO3X5M00Uzz04mcq+OrJvYp2Nbm/E722ecELlUrPXMzGfBLyZZ XX71hJB/NPD8DI8vbfg6xuVUoXh6nxJKJ1/6KBhqtRwF/0knQOFWmuvCNNC9YFD0qbOw acdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=vf+VTyyTWGsnZnHhl+GAHyRGdszNXCGk/WkrL9vpyfI=; b=oF/7KHI1SxBIzXC6BbYA4oBVjtZDj64Oy4RVeYwz2Rr1BMvkTtX4Hw1kfCmASmu1vQ 2wbd6YXBf4UditwcmnMB6dOEGxjdu0hwawOohz7Jx8s7UtQBwVhCPMhXVM/y0I1DH1FD iDK7WoMRpvr9F6Wf5UvDd1ERB1pCjYtDf3qpyDKuDDfhOeRM/Fyex9esv/UCEXdwsdYA 1HoKtyryI9f8uGJSYXGikrWFhISfoGE7Q1/dKIObUmln2ekowJqBr6xKlevXJs9WlhLm 4LEwWkzV9nUaTD8/KnPuixKBNGNzj0hraWpTrSo/xxGpOHHGgbq6c5bQbddZ3kgTQjYL A/XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=X0asbNSZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y19-20020a17090629d300b00726be5d76c0si9181861eje.932.2022.07.11.07.50.16; Mon, 11 Jul 2022 07:50:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=X0asbNSZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229873AbiGKOQx (ORCPT + 99 others); Mon, 11 Jul 2022 10:16:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229745AbiGKOQr (ORCPT ); Mon, 11 Jul 2022 10:16:47 -0400 Received: from mail-yb1-xb2b.google.com (mail-yb1-xb2b.google.com [IPv6:2607:f8b0:4864:20::b2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A14F2E9C4; Mon, 11 Jul 2022 07:16:46 -0700 (PDT) Received: by mail-yb1-xb2b.google.com with SMTP id r3so8933967ybr.6; Mon, 11 Jul 2022 07:16:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vf+VTyyTWGsnZnHhl+GAHyRGdszNXCGk/WkrL9vpyfI=; b=X0asbNSZ/Y7jCOKEBpas/c4n4OwC80T9tb9l/BhDwIDJpeLk0iTbLxlHcXvyemkXSU OJC2nqFEO6p9/XMcyD4JBTnH4BLCtqV0Rol9+upzxpISvgbdEUWVeOWm31YoyL4bOj82 mcgv4yXSZeCV0Y/ks8U0t8DyeDtJ0evxZplTay+u+RbCd1MufmfaA2VLTCAiG94333e7 dtCNNyGUEd0k58gRIqkDdPIRMR3v2vfZPo711l4OtghEihiQLjPb7PtK5LYelUnO5hFD rhueqr7PJ7fqo/L9PZufFXYNU9h/eUX3nxNRYtSbqCpzv66JG96Hzna4Q9UDDxU2LoBu IAGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vf+VTyyTWGsnZnHhl+GAHyRGdszNXCGk/WkrL9vpyfI=; b=md/OLBsVdpe8tGoJAX0fifHUDpdhCzW+yVwNb3GZycsQ8VU1Nit2W+w5Va8WhxSIUc PQ7ZzDE5t3tkFvNSwuLJRLfblE35sWtDbi70Zy9U30dn/V5pG6x+uoNzVL9HehNv4hOx X7LWtq+FOjys+JSWSmSrBKL5lDag3Pbpjv0vPpL78OHaVic7bEqeBQy/P5JxCdixnAlQ 0MYClSm1wD2/+cj6nVKUhiSsHDrUS0Xz4rdxtFQiGacsyuWjqDXLNd2j36XMnrAerFtL YRJ5+dgYmePmE/GpB95vZlZ/nkt8KZCfyjBE+aLljk4zQDaLBa1/I08XX482CbCYOO1s NMDw== X-Gm-Message-State: AJIora9CnYOm60W9m73DNqXYLuzcccHgmiUCfmhS4wJ5LxRMWFoCJd3p 4lROKCXEZQY40jIySRS/0SvGXb22sZu1RJfZcYw= X-Received: by 2002:a05:6902:10c9:b0:668:e27c:8f7 with SMTP id w9-20020a05690210c900b00668e27c08f7mr17319442ybu.128.1657549005246; Mon, 11 Jul 2022 07:16:45 -0700 (PDT) MIME-Version: 1.0 References: <20220711134312.234268-1-tmaimon77@gmail.com> <20220711134312.234268-3-tmaimon77@gmail.com> In-Reply-To: From: Andy Shevchenko Date: Mon, 11 Jul 2022 16:16:08 +0200 Message-ID: Subject: Re: [PATCH v1 2/2] iio: adc: npcm: Add NPCM8XX support To: Tomer Maimon Cc: Avi Fishman , Tali Perry , Joel Stanley , Patrick Venture , Nancy Yuen , Benjamin Fair , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , =?UTF-8?Q?Jonathan_Neusch=C3=A4fer?= , zhengbin13@huawei.com, OpenBMC Maillist , linux-iio , Linux Kernel Mailing List , devicetree Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 11, 2022 at 4:14 PM Andy Shevchenko wrote: > On Mon, Jul 11, 2022 at 3:59 PM Tomer Maimon wrote: ... > > struct device *dev = &pdev->dev; > > + const struct of_device_id *match; > > + match = of_match_node(npcm_adc_match, pdev->dev.of_node); > > + if (!match || !match->data) { > > + dev_err(dev, "Failed getting npcm_adc_data\n"); > > + return -ENODEV; > > + } > > > > + info->data = (struct npcm_adc_info *)match->data; > > Instead of above > > info->data = device_get_match_data(dev); > if (!info->data) > return -ENODEV; Or return dev_err_probe(dev, -EINVAL, "...\n"); if you want that message to be issued. -- With Best Regards, Andy Shevchenko