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=-9.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 48493C433E7 for ; Sun, 18 Oct 2020 03:17:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0088722202 for ; Sun, 18 Oct 2020 03:17:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=beagleboard-org.20150623.gappssmtp.com header.i=@beagleboard-org.20150623.gappssmtp.com header.b="UvR0Keh2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726074AbgJRDRl (ORCPT ); Sat, 17 Oct 2020 23:17:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725848AbgJRDRk (ORCPT ); Sat, 17 Oct 2020 23:17:40 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76C0AC0613CE for ; Sat, 17 Oct 2020 20:17:40 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id p21so3459278pju.0 for ; Sat, 17 Oct 2020 20:17:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beagleboard-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=Ap55+k0X65QDFkUFbJaD0x0HZL0267/P8A6Qo+hg04E=; b=UvR0Keh20DwvExsmI1kJn1PE+XrVUrZ7nFBQkw2z5Xe3xMNlsgKPi+n/djf69X8XD8 lNF/baQC3KxlkW7lPLR9z8/NSz0uOpLcNKthGGV4lYX7dTprm4Q/UC6/DSoXiebgW0xJ 1rKbhcJ6kwWKrdzUk4yIU9TcfI0qIVGCGbUZ8ILQOLJ/UJ0byxhdiD8l3TUD6ytLAcv3 ne98xzCc8lt93vwNr6jkVbBQ1diWe941x5mnG87sfL9w+fNTDq6p1pNnBqYPfFOdEMmm BTYx/cX1lRqt8Xd3BLL+uCnt/AeQDmeQwFNZM+TAHvBsjooH5dAgdDFzhko1J/6zkjNR FRoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=Ap55+k0X65QDFkUFbJaD0x0HZL0267/P8A6Qo+hg04E=; b=EvB8VT3TUfuTWWiA/L6ikaBa5YhxTCa5/yiBubfNGBE0vp3np4bsNdTDUVHSZwRwjI T8uhAJU7xCh9/zhUnIymW9ko8uQ0WHob1t91q2Utl/CGIWVXTlVxOhEmJVpXMj0Wa9xN k+OfPzmDIxvlUUVpP1I0ss057jAS7D3fQqvsqiM6HAMcPZl7EQVi6sfW94h3zU/cZORU mBhsQ1zXWChDFdf9VuVgnoh4YnNgXkOI1/AK79bVdefDlOEjuSuKpp1zfsdLekWd+FMf yciesejo8vBD5RZjwP/M5NEgL7BH6JWSHfkjPAZwDEBQb7IjLwxdPeGMe3RIJrAyIyTk T2og== X-Gm-Message-State: AOAM531vBij2FMys3ACKKuzK0zG/LAFtlx2xg2NakIeYHlHLt3YCSfZn nXFwKgEFyo+Hn5kykff8LW+b X-Google-Smtp-Source: ABdhPJyt6tarnmNiBF6KZgtHhZZo8v6bzh9VCB5fQfTD38VIABcCDRAVXJgkiioTHQC28xZ4mgbjNg== X-Received: by 2002:a17:902:b68d:b029:d3:e6e4:3d99 with SMTP id c13-20020a170902b68db02900d3e6e43d99mr11577728pls.62.1602991058793; Sat, 17 Oct 2020 20:17:38 -0700 (PDT) Received: from ubuntu ([116.68.78.80]) by smtp.gmail.com with ESMTPSA id g1sm7396375pfm.124.2020.10.17.20.17.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Oct 2020 20:17:38 -0700 (PDT) Date: Sun, 18 Oct 2020 08:47:32 +0530 From: Vaishnav M A To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, alexandru.ardelean@analog.com, linus.walleij@linaro.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: jkridner@beagleboard.org, drew@beagleboard.org, robertcnelson@beagleboard.org, rajkovic@mikroe.com Subject: [PATCH v2] iio: proximity: as3935 change of_property_read to device_property_read Message-ID: <20201018031732.GA27204@ubuntu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org replace the of_property_read_u32 for reading the ams,tuning-capacitor-pf, ams,nflwdth properties with device_property_read_u32, allows the driver to get the properties information using the more generic device_property_* helpers and opens the possibility of passing the properties during platform instantiation of the device by a suitably populated struct property_entry Signed-off-by: Vaishnav M A --- v2: - fix commit message drivers/iio/proximity/as3935.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/iio/proximity/as3935.c b/drivers/iio/proximity/as3935.c index c339e7339ec8..7e47ddf89a56 100644 --- a/drivers/iio/proximity/as3935.c +++ b/drivers/iio/proximity/as3935.c @@ -355,7 +355,6 @@ static int as3935_probe(struct spi_device *spi) struct iio_dev *indio_dev; struct iio_trigger *trig; struct as3935_state *st; - struct device_node *np = spi->dev.of_node; int ret; /* Be sure lightning event interrupt is specified */ @@ -374,7 +373,7 @@ static int as3935_probe(struct spi_device *spi) spi_set_drvdata(spi, indio_dev); mutex_init(&st->lock); - ret = of_property_read_u32(np, + ret = device_property_read_u32(&spi->dev, "ams,tuning-capacitor-pf", &st->tune_cap); if (ret) { st->tune_cap = 0; @@ -390,7 +389,7 @@ static int as3935_probe(struct spi_device *spi) return -EINVAL; } - ret = of_property_read_u32(np, + ret = device_property_read_u32(&spi->dev, "ams,nflwdth", &st->nflwdth_reg); if (!ret && st->nflwdth_reg > AS3935_NFLWDTH_MASK) { dev_err(&spi->dev, -- 2.25.1