All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: core: Actually put the gpiod after use
@ 2019-04-20 11:34 Linus Walleij
  2019-04-25 19:24 ` Applied "regulator: core: Actually put the gpiod after use" to the regulator tree Mark Brown
  2019-04-25 19:26 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Linus Walleij @ 2019-04-20 11:34 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown
  Cc: linux-kernel, Charles Keepax, Bartosz Golaszewski,
	Marek Szyprowski, Linus Walleij

I went to great lengths to hand over the management of the GPIO
descriptors to the regulator core, and some stray rebased
oneliner in the old patch must have been assuming the devices
were still doing devres management of it.

We handed the management over to the regulator core, so of
course the regulator core shall issue gpiod_put() when done.

Sorry for the descriptor leak.

Fixes: 541d052d7215 ("regulator: core: Only support passing enable GPIO descriptors")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/regulator/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 68473d0cc57e..362f34e73a3f 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2256,6 +2256,7 @@ static void regulator_ena_gpio_free(struct regulator_dev *rdev)
 		if (pin->gpiod == rdev->ena_pin->gpiod) {
 			if (pin->request_count <= 1) {
 				pin->request_count = 0;
+				gpiod_put(pin->gpiod);
 				list_del(&pin->list);
 				kfree(pin);
 				rdev->ena_pin = NULL;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Applied "regulator: core: Actually put the gpiod after use" to the regulator tree
  2019-04-20 11:34 [PATCH] regulator: core: Actually put the gpiod after use Linus Walleij
@ 2019-04-25 19:24 ` Mark Brown
  2019-04-25 19:26 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2019-04-25 19:24 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Bartosz Golaszewski, Charles Keepax, Liam Girdwood, linux-kernel,
	Marek Szyprowski, Mark Brown

The patch

   regulator: core: Actually put the gpiod after use

has been applied to the regulator tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-5.1

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

From 78927aa40bc82f32de07323ddc1c9de07ac68180 Mon Sep 17 00:00:00 2001
From: Linus Walleij <linus.walleij@linaro.org>
Date: Sat, 20 Apr 2019 13:34:30 +0200
Subject: [PATCH] regulator: core: Actually put the gpiod after use

I went to great lengths to hand over the management of the GPIO
descriptors to the regulator core, and some stray rebased
oneliner in the old patch must have been assuming the devices
were still doing devres management of it.

We handed the management over to the regulator core, so of
course the regulator core shall issue gpiod_put() when done.

Sorry for the descriptor leak.

Fixes: 541d052d7215 ("regulator: core: Only support passing enable GPIO descriptors")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/regulator/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 8573dd0871fd..35a7d020afec 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2256,6 +2256,7 @@ static void regulator_ena_gpio_free(struct regulator_dev *rdev)
 		if (pin->gpiod == rdev->ena_pin->gpiod) {
 			if (pin->request_count <= 1) {
 				pin->request_count = 0;
+				gpiod_put(pin->gpiod);
 				list_del(&pin->list);
 				kfree(pin);
 				rdev->ena_pin = NULL;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Applied "regulator: core: Actually put the gpiod after use" to the regulator tree
  2019-04-20 11:34 [PATCH] regulator: core: Actually put the gpiod after use Linus Walleij
  2019-04-25 19:24 ` Applied "regulator: core: Actually put the gpiod after use" to the regulator tree Mark Brown
@ 2019-04-25 19:26 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2019-04-25 19:26 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Bartosz Golaszewski, Charles Keepax, Liam Girdwood, linux-kernel,
	Marek Szyprowski, Mark Brown

The patch

   regulator: core: Actually put the gpiod after use

has been applied to the regulator tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-5.1

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

From 78927aa40bc82f32de07323ddc1c9de07ac68180 Mon Sep 17 00:00:00 2001
From: Linus Walleij <linus.walleij@linaro.org>
Date: Sat, 20 Apr 2019 13:34:30 +0200
Subject: [PATCH] regulator: core: Actually put the gpiod after use

I went to great lengths to hand over the management of the GPIO
descriptors to the regulator core, and some stray rebased
oneliner in the old patch must have been assuming the devices
were still doing devres management of it.

We handed the management over to the regulator core, so of
course the regulator core shall issue gpiod_put() when done.

Sorry for the descriptor leak.

Fixes: 541d052d7215 ("regulator: core: Only support passing enable GPIO descriptors")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/regulator/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 8573dd0871fd..35a7d020afec 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2256,6 +2256,7 @@ static void regulator_ena_gpio_free(struct regulator_dev *rdev)
 		if (pin->gpiod == rdev->ena_pin->gpiod) {
 			if (pin->request_count <= 1) {
 				pin->request_count = 0;
+				gpiod_put(pin->gpiod);
 				list_del(&pin->list);
 				kfree(pin);
 				rdev->ena_pin = NULL;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-25 19:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-20 11:34 [PATCH] regulator: core: Actually put the gpiod after use Linus Walleij
2019-04-25 19:24 ` Applied "regulator: core: Actually put the gpiod after use" to the regulator tree Mark Brown
2019-04-25 19:26 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.