From nobody Sun Nov 24 15:57:43 2024 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.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 D53A01CC177; Mon, 4 Nov 2024 19:06:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730747193; cv=none; b=hg627kQqVOlBICOjzLGfVaWRDvCdegHp3jty9Sa/bB7tgnO8MMv3QxfYqcvYH+pPn+yGskHYGvnbTRGu1gBKl+8tY/1Rz9IVEwwUetFgthN9xi43N/zEOAt50Fz0qXk7NZiO6OziUSjhh9wqVW/jXReq1idXKqxeALt2WG+efgA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730747193; c=relaxed/simple; bh=Lu1Fi0IEy8M6BgnItjbqpPrJ7Hppzar99nXYlc6ZBCo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=jbAS5fGYva8qhGl/WPpeicKDNfO6AmSgXS5FIfGRyBkHrm+KZxst0ESPlorEk18Hev3AnJXPg7o8EMr2JmwqIGgBys1AVDvN8Ee2z9NrN453j02X81AXOPUeonKhDER+WYGgMW7EQ+Tev2JmrViwHWkWpJniz3Ui8g4WCrsi5/g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=G9VXQBg0; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="G9VXQBg0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E9CDC4CECE; Mon, 4 Nov 2024 19:06:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1730747193; bh=Lu1Fi0IEy8M6BgnItjbqpPrJ7Hppzar99nXYlc6ZBCo=; h=From:To:Cc:Subject:Date:From; b=G9VXQBg0OJr9ruK9K4Te4NS+RvBhpRlD4WWJHJs3yIccyl3pRBkCfGWgMIYEIKzmw rSTI1vpqCWAEaCVUnRfcPfmms/elbyEu3t9TBzjUBesAEXavjGErPlxcZmfy7PX9AQ hUT8bvNn5S5o3YO4inhpE3WV53tj4MY2OBS8rCzlkuJlL1q52+GUtxZybenNVrDEeJ H9OWVcFNMUU4JZk+6OVCq7VROHwDHURpj+XvwFN3bOf5eBG1dRfsn1wwx0tQbFVEM1 0HU40fbhcQbo2vXvhy2E35buIOujmsJHWjU16F9IxXF3TtMrhRyeG29tUODrrpUyfq Oj0NfitO9kYEg== From: "Rob Herring (Arm)" To: Linus Walleij , Bartosz Golaszewski , Heiko Stuebner Cc: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] gpio: Use of_property_present() for non-boolean properties Date: Mon, 4 Nov 2024 13:06:27 -0600 Message-ID: <20241104190628.274717-1-robh@kernel.org> X-Mailer: git-send-email 2.45.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The use of of_property_read_bool() for non-boolean properties is deprecated in favor of of_property_present() when testing for property presence. Signed-off-by: Rob Herring (Arm) Reviewed-by: Dragan Simic Reviewed-by: Heiko Stuebner --- drivers/gpio/gpio-rockchip.c | 2 +- drivers/gpio/gpiolib-of.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c index 365ab947983c..64924bc01591 100644 --- a/drivers/gpio/gpio-rockchip.c +++ b/drivers/gpio/gpio-rockchip.c @@ -602,7 +602,7 @@ static int rockchip_gpiolib_register(struct rockchip_pi= n_bank *bank) * files which don't set the "gpio-ranges" property or systems that * utilize ACPI the driver has to call gpiochip_add_pin_range(). */ - if (!of_property_read_bool(bank->of_node, "gpio-ranges")) { + if (!of_property_present(bank->of_node, "gpio-ranges")) { struct device_node *pctlnp =3D of_get_parent(bank->of_node); struct pinctrl_dev *pctldev =3D NULL; =20 diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index 880f1efcaca5..2e537ee979f3 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -337,7 +337,7 @@ static void of_gpio_flags_quirks(const struct device_no= de *np, * to determine if the flags should have inverted semantics. */ if (IS_ENABLED(CONFIG_SPI_MASTER) && !strcmp(propname, "cs-gpios") && - of_property_read_bool(np, "cs-gpios")) { + of_property_present(np, "cs-gpios")) { u32 cs; int ret; =20 --=20 2.45.2