[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250212144126.120231-1-theo.lebrun@bootlin.com>
Date: Wed, 12 Feb 2025 15:41:26 +0100
From: Théo Lebrun <theo.lebrun@...tlin.com>
To: jbrunet@...libre.com
Cc: Laurent.pinchart@...asonboard.com,
abelvesa@...nel.org,
airlied@...il.com,
andrzej.hajda@...el.com,
arnd@...db.de,
bryan.odonoghue@...aro.org,
conor.dooley@...rochip.com,
daire.mcnamara@...rochip.com,
dakr@...nel.org,
david.m.ertman@...el.com,
dianders@...omium.org,
dri-devel@...ts.freedesktop.org,
festevam@...il.com,
gregkh@...uxfoundation.org,
gregory.clement@...tlin.com,
hdegoede@...hat.com,
ilpo.jarvinen@...ux.intel.com,
imx@...ts.linux.dev,
ira.weiny@...el.com,
jernej.skrabec@...il.com,
jonas@...boo.se,
kernel@...gutronix.de,
khilman@...libre.com,
linux-amlogic@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org,
linux-clk@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-mips@...r.kernel.org,
linux-riscv@...ts.infradead.org,
maarten.lankhorst@...ux.intel.com,
martin.blumenstingl@...glemail.com,
mripard@...nel.org,
mturquette@...libre.com,
neil.armstrong@...aro.org,
p.zabel@...gutronix.de,
peng.fan@....com,
platform-driver-x86@...r.kernel.org,
rafael@...nel.org,
rfoss@...nel.org,
s.hauer@...gutronix.de,
sboyd@...nel.org,
shawnguo@...nel.org,
simona@...ll.ch,
theo.lebrun@...tlin.com,
tzimmermann@...e.de,
vladimir.kondratiev@...ileye.com
Subject: [PATCH] reset: eyeq: drop device_set_of_node_from_dev() done by parent
Our parent driver (clk-eyeq) now does the
device_set_of_node_from_dev(dev, dev->parent)
call through the newly introduced devm_auxiliary_device_create() helper.
Doing it again in the reset-eyeq probe would be redundant.
Drop both the WARN_ON() and the device_set_of_node_from_dev() call.
Also fix the following comment that talks about "our newfound OF node".
Signed-off-by: Théo Lebrun <theo.lebrun@...tlin.com>
---
drivers/reset/reset-eyeq.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/drivers/reset/reset-eyeq.c b/drivers/reset/reset-eyeq.c
index 02d50041048b..8018fa895427 100644
--- a/drivers/reset/reset-eyeq.c
+++ b/drivers/reset/reset-eyeq.c
@@ -420,17 +420,8 @@ static int eqr_probe(struct auxiliary_device *adev,
int ret;
/*
- * We are an auxiliary device of clk-eyeq. We do not have an OF node by
- * default; let's reuse our parent's OF node.
- */
- WARN_ON(dev->of_node);
- device_set_of_node_from_dev(dev, dev->parent);
- if (!dev->of_node)
- return -ENODEV;
-
- /*
- * Using our newfound OF node, we can get match data. We cannot use
- * device_get_match_data() because it does not match reused OF nodes.
+ * Get match data. We cannot use device_get_match_data() because it does
+ * not accept reused OF nodes; see device_set_of_node_from_dev().
*/
match = of_match_node(dev->driver->of_match_table, dev->of_node);
if (!match || !match->data)
--
2.48.1
Powered by blists - more mailing lists