Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2488846rbb; Wed, 28 Feb 2024 03:34:57 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXFAvEVfcfXnM/JgRrfM/uUWZ9GpSJ50wOgWjBaxv9pDAE/In/JRtP1lkcH5m+/46+TaCRRL+tjqEl7DOrMTU9vI3GePaYiAV1EvZwkow== X-Google-Smtp-Source: AGHT+IHFeT42ONxVo84XTG04mtUf442PGxPQwJ98eFbAehvJf9xVO7RTkenyQJb9ddFHiFxKzLMK X-Received: by 2002:a05:6830:1508:b0:6e4:b248:398b with SMTP id k8-20020a056830150800b006e4b248398bmr3834792otp.9.1709120097121; Wed, 28 Feb 2024 03:34:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709120097; cv=pass; d=google.com; s=arc-20160816; b=KYpaCNntuZX7oS7oJ6kc+t8/BoNRufWDeLHigYZeTfClOFI6qwL7M2RWHyHTclx3UM THhHwGtGSsyei57XWtwX0buEAnTC3qSPAHb67TNrS7GDpNVZe/A1ljilDDsGZtFSxQkx 8Z5zjBLGo9zPmixbj+gm0inBoIhF6KsgcUCzhsIVgAFESNrOaobGt8166TPRyW5kHKd5 /VPMzIswhWqURybeB5crnuTmUvMH/rPFGaTquOJeXQBeERgebNO0w2gBvBNWdFsn090Z ImQTlyubPxHeEeoxBov2pbSrxfLV9+zJL09/AQFXnYt+vEHxWMX9intThrxUyv/UlK5p N07Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=R3+PrmUdd2JxDTzSX+hLtESErBB0gvWqKNs59dVKhlg=; fh=FEGj322JUxHP58NgFBs9atrc2KpQCnFuCu2ueZtAhdY=; b=AEjkN38a/0+56pASRClhmTKkU3DgFVOL6c/ZR/uZMiGG9U4+e2G1fH2QPlHpewZE6h KI0qfZS5thKRcPjwlGEoXEn3vCh0ciy34XzQttjtO3OFPbrs9t6OCuxpQL3FAfJGrMqR w1syfyT+z6iptTlCgpLgxUArcF+P0G5pf4lEsQ/wx/D3FB609VJYkNCfgTB5mZKLe8zt Hx6v5t60F9db3Js57d4mJAdijySR7ybrxVUkhY8A7P3AMlb54/+qmgu9aqEtkyRTHAg6 JjET6c7VhVV4mvad4LZDgq2Ds9JsKkq+schqw7CKYDTTjC/eJrtethtkJNKGcWg4GSqC WK7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=PP1gpCD0; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-84892-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84892-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id f13-20020a63dc4d000000b005dc7fe30f45si7257745pgj.567.2024.02.28.03.34.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 03:34:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84892-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=PP1gpCD0; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-84892-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84892-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id E671EB255CE for ; Wed, 28 Feb 2024 11:31:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D2970156963; Wed, 28 Feb 2024 11:28:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="PP1gpCD0" Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 36D8F145B3F; Wed, 28 Feb 2024 11:28:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709119706; cv=none; b=iXsoYT+26EkUrgE6xXF1KmbyCdVRee2xSksrKirHglswSyTtewFjSj48bO7SKygC8eU3t8PUrzSrjjPkfkQo/aM7sVcVGfKxWbJ2dFoNpmijhjCnrD36zOTzdlaBLn517RXXJejhYKsEp9HZsS7XbIwZO8oOmClY/pabIUSXvHs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709119706; c=relaxed/simple; bh=gU9cgFP1eW1ErSI0tVUIno18z4mihP0BGkwcTO3apZs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Bt0/e5GLM7NdsDEQqlMXVTTuxdyF037Va1xPr2CBXpm6qgDDN/tU43jIqjDPpxEvSaKFpYBrCe+puFU5RonS9/xBTDC6RHh+S5rySREROru7EgVOIBV8kT/IqsWsf9vIw7MIkE6Mx/Qx6a1T+5F51rL4bT0xYZB4mzhNBIsgl/o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=PP1gpCD0; arc=none smtp.client-ip=217.70.183.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 07A861BF216; Wed, 28 Feb 2024 11:28:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1709119702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=R3+PrmUdd2JxDTzSX+hLtESErBB0gvWqKNs59dVKhlg=; b=PP1gpCD0nIoqW9wwkVhZc7WMU1fSYlTP1LZ7XicD/2IMB9mknsnzgf8+wwHjUeQZttCarg sHoXgb+Zr8a38CcTpqRNAlYSWuUYrLl5BswX3jR2YJzRvpnXztjZEKXQPW7lmQXOObwQ/P NaTpg9M5vet0Lyuk7xgAPOZDX2xkcNSUW7wWyA+vluJMXWzq3lrSvmEgqt/oaMF5jQgtDJ 7oM6s7hlFeZn/DdfFJIbMPdKMJTutQP+Sb+Hzu1O6cOWukDb1YBI6hD/8Z5+79MV9EkRym OJmb2TtYiMHo7E5aJ9z8l49yPgZft6mfCmJoOUeWAJl/+oyc8xeMyPqzKnM5Lg== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Wed, 28 Feb 2024 12:28:14 +0100 Subject: [PATCH v2 16/30] gpio: nomadik: replace of_property_read_*() by device_property_read_*() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240228-mbly-gpio-v2-16-3ba757474006@bootlin.com> References: <20240228-mbly-gpio-v2-0-3ba757474006@bootlin.com> In-Reply-To: <20240228-mbly-gpio-v2-0-3ba757474006@bootlin.com> To: Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel , Thomas Bogendoerfer Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, Gregory CLEMENT , Vladimir Kondratiev , Thomas Petazzoni , Tawfik Bayouk , =?utf-8?q?Th=C3=A9o_Lebrun?= X-Mailer: b4 0.13.0 X-GND-Sasl: theo.lebrun@bootlin.com Avoid OF APIs in the GPIO subsystem. Here, replace of_property_read_{u32,bool}() call by device_property_read_{u32,bool}(). Signed-off-by: Théo Lebrun --- drivers/gpio/gpio-nomadik.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-nomadik.c b/drivers/gpio/gpio-nomadik.c index f3ef3b4d08eb..bba183c0b597 100644 --- a/drivers/gpio/gpio-nomadik.c +++ b/drivers/gpio/gpio-nomadik.c @@ -497,7 +497,7 @@ struct nmk_gpio_chip *nmk_gpio_populate_chip(struct device_node *np, } gpio_pdev = to_platform_device(gpio_dev); - if (of_property_read_u32(np, "gpio-bank", &id)) { + if (device_property_read_u32(gpio_dev, "gpio-bank", &id)) { dev_err(&pdev->dev, "populate: gpio-bank property not found\n"); platform_device_put(gpio_pdev); return ERR_PTR(-EINVAL); @@ -587,7 +587,7 @@ static int nmk_gpio_probe(struct platform_device *dev) } supports_sleepmode = - of_property_read_bool(np, "st,supports-sleepmode"); + device_property_read_bool(dev, "st,supports-sleepmode"); /* Correct platform device ID */ dev->id = nmk_chip->bank; -- 2.44.0