Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3045939pxj; Mon, 7 Jun 2021 00:18:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjIQnNQfebWalOmtJfhM2HuKQ4XOWkyXkgXJMHa1WL3qpMYmvTNRDh9gWHXw3y6JTskfb5 X-Received: by 2002:a17:906:edb3:: with SMTP id sa19mr16366938ejb.75.1623050317335; Mon, 07 Jun 2021 00:18:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623050317; cv=none; d=google.com; s=arc-20160816; b=DBUWR0W54x5PYmjm6thFZxCz2PyOisF9+j2TFUizYqBgZ1jW/3YdEu/CTApsp76Ip5 svrhggyP0mvsRp75cxWrIsMb3qyzFmuiHk7c89Vh72foP1mXg/TlFUSHdGPZV41SjcNl 0HNbA/8OdoszPmRrgm1ZWmP/VVBuGgVbtdXOFunvNQ97pThD+rG4FqI+QjsvaQri4JR9 zupcwUl98tiVJ8WFNi9AL2d0F+4stH83cjB2MsziF5KB8zis8s3vdlqaF7IVrJn6HvZx KZZH9jaPHdQUSb9uA4YD+G2A/u5Ous+VMj5LK4SxIa9W6kr6PxN8YyTrHt6PlUc2MeH/ UIKg== 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=F7CvYJdaD2nt+R/bT3B7LWQLlkau4OLKauh9+Yv/Irw=; b=P6MHgSpT9+/JV6c5CGB3S2c1LfF58olCdDixrrI67rSedSa0JYvYi+Eu0xew0uPZYX KfQowXGcf4FJjzZRH6F12YTA9mEPDXpH5zIGyqjpGU8VZQ9nFAlT2vTwj9WSBnMCfsSJ KBefp8NaV38YEcMe0cKT5v33GE6/3hhwRDm2e9QtHSOTomcJxOBNOWWKOrL+dTqYxpn1 hphk8jfBTD9bi3F/eL+XkBrpNRU3SBwlYDW1kd83HY4RalVYRHiRRCytiilV3FOgdQzb JolSrLFMhuPGeOF+63XqMYZwfiqwPXWbPaTqPGN+fKAuQehOLrEHiY2eAYGnm84z7Rw7 KJSA== 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 t8si11412508edr.491.2021.06.07.00.18.15; Mon, 07 Jun 2021 00:18:37 -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 S230321AbhFGHRo (ORCPT + 99 others); Mon, 7 Jun 2021 03:17:44 -0400 Received: from twspam01.aspeedtech.com ([211.20.114.71]:35904 "EHLO twspam01.aspeedtech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230323AbhFGHRn (ORCPT ); Mon, 7 Jun 2021 03:17:43 -0400 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 15771goS056349; Mon, 7 Jun 2021 15:01:42 +0800 (GMT-8) (envelope-from steven_lee@aspeedtech.com) Received: from slee-VirtualBox.localdomain (192.168.100.253) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 7 Jun 2021 15:15:27 +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 v4 7/7] gpio: gpio-aspeed-sgpio: Use generic device property APIs Date: Mon, 7 Jun 2021 15:15:12 +0800 Message-ID: <20210607071514.11727-8-steven_lee@aspeedtech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210607071514.11727-1-steven_lee@aspeedtech.com> References: <20210607071514.11727-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 15771goS056349 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 --- 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 b53dd1fa5849..da62e213916a 100644 --- a/drivers/gpio/gpio-aspeed-sgpio.c +++ b/drivers/gpio/gpio-aspeed-sgpio.c @@ -573,7 +573,7 @@ static int __init aspeed_sgpio_probe(struct platform_device *pdev) pin_mask = ASPEED_SGPIO_PINS_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; @@ -588,7 +588,7 @@ static int __init aspeed_sgpio_probe(struct platform_device *pdev) } gpio->n_sgpio = nr_gpios; - 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