* [PATCH] regulator: irq_helpers: duplicate IRQ name
@ 2024-04-07 7:35 Matti Vaittinen
2024-04-09 13:08 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Matti Vaittinen @ 2024-04-07 7:35 UTC (permalink / raw)
To: Matti Vaittinen, Matti Vaittinen
Cc: Matti Vaittinen, Liam Girdwood, Mark Brown, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1483 bytes --]
The regulator IRQ helper requires caller to provide pointer to IRQ name
which is kept in memory by caller. All other data passed to the helper
in the regulator_irq_desc structure is copied. This can cause some
confusion and unnecessary complexity.
Make the regulator_irq_helper() to copy also the provided IRQ name
information so caller can discard the name after the call to
regulator_irq_helper() completes.
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
---
drivers/regulator/irq_helpers.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/regulator/irq_helpers.c b/drivers/regulator/irq_helpers.c
index fe7ae0f3f46a..5ab1a0befe12 100644
--- a/drivers/regulator/irq_helpers.c
+++ b/drivers/regulator/irq_helpers.c
@@ -352,6 +352,9 @@ void *regulator_irq_helper(struct device *dev,
h->irq = irq;
h->desc = *d;
+ h->desc.name = devm_kstrdup(dev, d->name, GFP_KERNEL);
+ if (!h->desc.name)
+ return ERR_PTR(-ENOMEM);
ret = init_rdev_state(dev, h, rdev, common_errs, per_rdev_errs,
rdev_amount);
base-commit: 4cece764965020c22cff7665b18a012006359095
--
2.43.2
--
Matti Vaittinen, Linux device drivers
ROHM Semiconductors, Finland SWDC
Kiviharjunlenkki 1E
90220 OULU
FINLAND
~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~
Simon says - in Latin please.
~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~
Thanks to Simon Glass for the translation =]
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] regulator: irq_helpers: duplicate IRQ name
2024-04-07 7:35 [PATCH] regulator: irq_helpers: duplicate IRQ name Matti Vaittinen
@ 2024-04-09 13:08 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2024-04-09 13:08 UTC (permalink / raw)
To: Matti Vaittinen, Matti Vaittinen; +Cc: Liam Girdwood, linux-kernel
On Sun, 07 Apr 2024 10:35:21 +0300, Matti Vaittinen wrote:
> The regulator IRQ helper requires caller to provide pointer to IRQ name
> which is kept in memory by caller. All other data passed to the helper
> in the regulator_irq_desc structure is copied. This can cause some
> confusion and unnecessary complexity.
>
> Make the regulator_irq_helper() to copy also the provided IRQ name
> information so caller can discard the name after the call to
> regulator_irq_helper() completes.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thanks!
[1/1] regulator: irq_helpers: duplicate IRQ name
commit: 7ab681ddedd4b6dd2b047c74af95221c5f827e1d
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-09 13:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-07 7:35 [PATCH] regulator: irq_helpers: duplicate IRQ name Matti Vaittinen
2024-04-09 13:08 ` Mark Brown
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®