]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
reset: eyeq: drop device_set_of_node_from_dev() done by parent
authorThéo Lebrun <theo.lebrun@bootlin.com>
Wed, 25 Feb 2026 16:55:07 +0000 (17:55 +0100)
committerStephen Boyd <sboyd@kernel.org>
Wed, 29 Apr 2026 02:03:50 +0000 (19:03 -0700)
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: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/reset/reset-eyeq.c

index 791b7283111e2d4e7163ca80152bb4a023c1dc84..1a38579838970930f66c5225c1170dd8ed828bb9 100644 (file)
@@ -422,13 +422,6 @@ static int eqr_of_xlate_twocells(struct reset_controller_dev *rcdev,
        return eqr_of_xlate_internal(rcdev, reset_spec->args[0], reset_spec->args[1]);
 }
 
-static void eqr_of_node_put(void *_dev)
-{
-       struct device *dev = _dev;
-
-       of_node_put(dev->of_node);
-}
-
 static int eqr_probe(struct auxiliary_device *adev,
                     const struct auxiliary_device_id *id)
 {
@@ -439,21 +432,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;
-
-       ret = devm_add_action_or_reset(dev, eqr_of_node_put, dev);
-       if (ret)
-               return ret;
-
-       /*
-        * 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)