Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2870948pxv; Mon, 12 Jul 2021 04:04:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1pYzWfBp6TWCphqsa0d9jCpQb7bWi4p4jAwKIKZQnv9/dXBND0Gl9n3/lx/FLligDq4hq X-Received: by 2002:a05:6e02:1d15:: with SMTP id i21mr6771328ila.307.1626087853791; Mon, 12 Jul 2021 04:04:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626087853; cv=none; d=google.com; s=arc-20160816; b=taffuazB+jHBN71hhtx83Z6xU8VgBByA0NIzwpctyoyIZl2EOPxMfskpDXlhrJeWBu 4K1R3xtHcjFLTPmhP0eeMEyrPo0h/KsVyfmZeSNEud+alH1P/GxUbRax65mmlGZYcX7G A3LYNWJ5xbPS3zWsz4yvtwqd6c7ros9oUDdNb4VezF1wnB9I/jlN9DcGAn2BAsJkClUV QxKDDSicogGniDh7OmhjgcL3lYKDniJKS2tyLiwgIz5yHWl4J/vqm235nsBzd7yml+AT p9u0hxqfpl+k+RI3NHhU5NDVbspJxOgcBqihjUZcu1/d4f7FPYyP+mizaijAMMeR3YIi cpMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=ZPibw+1eyc1mfBJ6Ildm1kqZ4UUhmlkFc0IRw/c41eQ=; b=k+vGm1cancV7GfC2LO46ihVGV2ZUWRXuagR9nvMfEjo09Qhcdzjbd+ExBKWTTB+Iz1 Ypau7q1/Dxyf7b5WK799ymSLdtqyxhzTusGbWDYaWCOL4XMvE9zRQRcxtiYtsncpkwzt cO7axw2Oz+M0qYZCu/DxwKqq2ivHk9SShXP81FxzeOYbhfvfQ31Q6yCD9ESWWA384NwE anJYQ43JzmhjLmJAQbtqfF8tvWxpuTyMuT8K1BAOctCnw2iDuTl87tzfDjOD0eGWZR5F 105VzDTDyAdXGxecTw5uoUkYOtV6OQEnkSiu6QN16jUA5o9dtzdM5P1V+H2GtFbQE1sS 1HdQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w10si18006861jad.45.2021.07.12.04.04.02; Mon, 12 Jul 2021 04:04:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237257AbhGLKHI (ORCPT + 99 others); Mon, 12 Jul 2021 06:07:08 -0400 Received: from twspam01.aspeedtech.com ([211.20.114.71]:18782 "EHLO twspam01.aspeedtech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238271AbhGLKGx (ORCPT ); Mon, 12 Jul 2021 06:06:53 -0400 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 16C9ldYq099598; Mon, 12 Jul 2021 17:47:39 +0800 (GMT-8) (envelope-from steven_lee@aspeedtech.com) Received: from localhost.localdomain (192.168.100.253) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 12 Jul 2021 18:03:33 +0800 From: Steven Lee To: Linus Walleij , Bartosz Golaszewski , Rob Herring , Joel Stanley , Andrew Jeffery , "open list:GPIO SUBSYSTEM" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , open list CC: , , , Subject: [PATCH v6 8/9] gpio: gpio-aspeed-sgpio: Use generic device property APIs Date: Mon, 12 Jul 2021 18:03:15 +0800 Message-ID: <20210712100317.23298-9-steven_lee@aspeedtech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210712100317.23298-1-steven_lee@aspeedtech.com> References: <20210712100317.23298-1-steven_lee@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.168.100.253] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 16C9ldYq099598 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replace all of_property_read_u32() with device_property_read_u32(). Signed-off-by: Steven Lee Acked-by: Andrew Jeffery --- drivers/gpio/gpio-aspeed-sgpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-aspeed-sgpio.c b/drivers/gpio/gpio-aspeed-sgpio.c index 6b3695197c97..b3d05fc724f0 100644 --- a/drivers/gpio/gpio-aspeed-sgpio.c +++ b/drivers/gpio/gpio-aspeed-sgpio.c @@ -533,13 +533,13 @@ static int __init aspeed_sgpio_probe(struct platform_device *pdev) pin_mask = pdata->pin_mask; - rc = of_property_read_u32(pdev->dev.of_node, "ngpios", &nr_gpios); + rc = device_property_read_u32(&pdev->dev, "ngpios", &nr_gpios); if (rc < 0) { dev_err(&pdev->dev, "Could not read ngpios property\n"); return -EINVAL; } - rc = of_property_read_u32(pdev->dev.of_node, "bus-frequency", &sgpio_freq); + rc = device_property_read_u32(&pdev->dev, "bus-frequency", &sgpio_freq); if (rc < 0) { dev_err(&pdev->dev, "Could not read bus-frequency property\n"); return -EINVAL; -- 2.17.1