From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796383660; b=LzRd83tmdWBfn8sgw8+uHoU28eYYC+YSj7XUyelS6YuG8SnTGwoufsJZ9HnSg78RubgR PcwATbjsinV5EppqeZYFVu4TDsdq1OA/wtu14c2pcEoikZ5YKVnnCtBlmFaq8bqwdkMmD e3dwsDkAP9cWt797wKvYIdYrQiHiMTw0LKP9TI+2wWtD3XG+6V8f4Yq2KmkItsplgSdDF feoqJFPhde21T/iw60z6ViY5JQJMYZgOyMCYrbe9MvW5M9KxQUNOoc4XyMM+G+cr1RBId mj/0/ZEmjW40PdIx4NSGxP6IyiTZOmNfiHtsapLOVoYeKSx/cru2Zr8QYaF3sGvNYYg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796383660; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=KpPkfl5mCCQIjkcB+c8Xh2bkppi5uOq1JQjbnCUmGd0=; b=sViip0I6bq4TFdmDnrrDGLz6irPdfpQY9kbnH+OBJr4aXe8zYt506D2r0RBNTHYLGLcp KMhgUFVb0kUKH/n3x5uLsz78N2/iWfBJAite3L/XBhO9K1KyQ7h4p5hInGy83+Sg1D0Qm DcWOYi/X+IGPVSgvs2YqtkkN+y1rWMnUjczLgcwj/6rFXctoGnVX1Zs2pVmSUOHeBGIgz XcpsXyMrTKdXZ+ye9Jv61MXU1b5M/5/nb+aJA88dxDk10XBNezRut4R3BCSjtuxPOlff2 dnTSYqZBkJmsKGX49P32yqaQBB64K7UeKSzH0aMxAebKNNdSKNgZttYZzFSjp3DP0gg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=KUnHMqt1; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C5C4C606A322; Fri, 4 Dec 2026 11:27:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=KUnHMqt1 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3E5721F000CE; Fri, 4 Dec 2026 11:27:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796383660; bh=KpPkfl5mCCQIjkcB+c8Xh2bkppi5uOq1JQjbnCUmGd0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=KUnHMqt10sXZiOwmxgc5vzvb65T45RvhVPjU4rTY1SGN+XOhDLs/P9giSlGFgEr0u pUPnSPv2+do+MuasrCcHPwz+IoLc7JUDsuo00gFDUb0Lf7zvJ1hbgUPaHE7Fw4Hp2x G/Cit6MgJLReZ2SVpMEWdYytr6ikzMLUMAElMAxs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Linus Walleij , Bartosz Golaszewski , Sasha Levin Subject: [PATCH 6.12 316/555] gpio: davinci: use generic device properties Date: Fri, 4 Dec 2026 19:05:59 +0900 Message-ID: <20261204100621.585006941@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100603.988357525@linuxfoundation.org> References: <20261204100603.988357525@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Bartosz Golaszewski [ Upstream commit 5dfdcd9e73119dcb60b0299e96d2d84d23c354fd ] OF-specific routines should not be used unless necessary. Generic device properties are preferred so switch to using them in the driver code. Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20241007103440.38416-2-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski Stable-dep-of: a142f1c5de4b ("gpio: davinci: use controller-specific MMIO for BINTEN") Signed-off-by: Sasha Levin --- drivers/gpio/gpio-davinci.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c index 2011db9ccb4e5..1a09e394f41ba 100644 --- a/drivers/gpio/gpio-davinci.c +++ b/drivers/gpio/gpio-davinci.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -159,14 +158,13 @@ static int davinci_gpio_probe(struct platform_device *pdev) unsigned int ngpio, nbank, nirq, gpio_unbanked; struct davinci_gpio_controller *chips; struct device *dev = &pdev->dev; - struct device_node *dn = dev_of_node(dev); /* * The gpio banks conceptually expose a segmented bitmap, * and "ngpio" is one more than the largest zero-based * bit index that's valid. */ - ret = of_property_read_u32(dn, "ti,ngpio", &ngpio); + ret = device_property_read_u32(dev, "ti,ngpio", &ngpio); if (ret) return dev_err_probe(dev, ret, "Failed to get the number of GPIOs\n"); if (ngpio == 0) @@ -177,8 +175,8 @@ static int davinci_gpio_probe(struct platform_device *pdev) * interrupts is equal to number of gpios else all are banked so * number of interrupts is equal to number of banks(each with 16 gpios) */ - ret = of_property_read_u32(dn, "ti,davinci-gpio-unbanked", - &gpio_unbanked); + ret = device_property_read_u32(dev, "ti,davinci-gpio-unbanked", + &gpio_unbanked); if (ret) return dev_err_probe(dev, ret, "Failed to get the unbanked GPIOs property\n"); -- 2.53.0