mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
To: Krzysztof Kozlowski <krzk@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>
Cc: linux-kernel@vger.kernel.org,
	Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Subject: [PATCH 01/15] reset: gpio: remove unneeded OF-node put
Date: Mon, 05 Jan 2026 15:15:20 +0100	[thread overview]
Message-ID: <20260105-reset-core-refactor-v1-1-ac443103498d@oss.qualcomm.com> (raw)
In-Reply-To: <20260105-reset-core-refactor-v1-0-ac443103498d@oss.qualcomm.com>

Tasking the reset-gpio driver with controlling the reference count of an
OF node set up in reset core is a weird inversion of responsability. But
it's also wrong in that the underlying device never actually gets
removed so the node should not be put at all and especially not at
driver detach. Remove the devres action.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
---
 drivers/reset/reset-gpio.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/reset/reset-gpio.c b/drivers/reset/reset-gpio.c
index e5512b3b596b5290af20e5fdd99a38f81e670d2b..003bad361b3d32560f931f6b92234de523f97cf7 100644
--- a/drivers/reset/reset-gpio.c
+++ b/drivers/reset/reset-gpio.c
@@ -56,18 +56,12 @@ static int reset_gpio_of_xlate(struct reset_controller_dev *rcdev,
 	return reset_spec->args[0];
 }
 
-static void reset_gpio_of_node_put(void *data)
-{
-	of_node_put(data);
-}
-
 static int reset_gpio_probe(struct auxiliary_device *adev,
 			    const struct auxiliary_device_id *id)
 {
 	struct device *dev = &adev->dev;
 	struct of_phandle_args *platdata = dev_get_platdata(dev);
 	struct reset_gpio_priv *priv;
-	int ret;
 
 	if (!platdata)
 		return -EINVAL;
@@ -87,10 +81,6 @@ static int reset_gpio_probe(struct auxiliary_device *adev,
 	priv->rc.owner = THIS_MODULE;
 	priv->rc.dev = dev;
 	priv->rc.of_args = platdata;
-	ret = devm_add_action_or_reset(dev, reset_gpio_of_node_put,
-				       priv->rc.of_node);
-	if (ret)
-		return ret;
 
 	/* Cells to match GPIO specifier, but it's not really used */
 	priv->rc.of_reset_n_cells = 2;

-- 
2.47.3


  reply	other threads:[~2026-01-05 14:16 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-05 14:15 [PATCH 00/15] reset: major reset core refactoring Bartosz Golaszewski
2026-01-05 14:15 ` Bartosz Golaszewski [this message]
2026-01-08  9:02   ` [PATCH 01/15] reset: gpio: remove unneeded OF-node put Philipp Zabel
2026-01-05 14:15 ` [PATCH 02/15] reset: gpio: add a devlink between reset-gpio and its consumer Bartosz Golaszewski
2026-01-08  9:02   ` Philipp Zabel
2026-01-05 14:15 ` [PATCH 03/15] reset: gpio: simplify fallback device matching Bartosz Golaszewski
2026-01-08  9:26   ` Philipp Zabel
2026-01-05 14:15 ` [PATCH 04/15] reset: gpio: remove unneeded auxiliary_set_drvdata() Bartosz Golaszewski
2026-01-08  9:27   ` Philipp Zabel
2026-01-05 14:15 ` [PATCH 05/15] reset: warn on reset-gpio release Bartosz Golaszewski
2026-01-05 14:15 ` [PATCH 06/15] reset: fold ida_alloc() into reset_create_gpio_aux_device() Bartosz Golaszewski
2026-01-05 14:15 ` [PATCH 07/15] reset: use lock guards in reset core Bartosz Golaszewski
2026-01-08  9:39   ` Philipp Zabel
2026-01-05 14:15 ` [PATCH 08/15] reset: remove unneeded include Bartosz Golaszewski
2026-01-08  9:44   ` Philipp Zabel
2026-01-08 14:13     ` Bartosz Golaszewski
2026-01-05 14:15 ` [PATCH 09/15] reset: handle removing supplier before consumers Bartosz Golaszewski
2026-01-05 14:15 ` [PATCH 10/15] reset: protect struct reset_controller_dev with its own mutex Bartosz Golaszewski
2026-01-05 14:15 ` [PATCH 11/15] reset: protect struct reset_control " Bartosz Golaszewski
2026-01-05 14:15 ` [PATCH 12/15] reset: convert of_reset_control_get_count() to using firmware nodes Bartosz Golaszewski
2026-01-05 14:15 ` [PATCH 13/15] reset: convert the core API " Bartosz Golaszewski
2026-01-05 14:15 ` [PATCH 14/15] reset: convert reset core " Bartosz Golaszewski
2026-01-05 14:15 ` [PATCH 15/15] reset: gpio: make the driver fwnode-agnostic Bartosz Golaszewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260105-reset-core-refactor-v1-1-ac443103498d@oss.qualcomm.com \
    --to=bartosz.golaszewski@oss.qualcomm.com \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®