regulator: irq_helpers: duplicate IRQ name
authorMatti Vaittinen <mazziesaccount@gmail.com>
Sun, 7 Apr 2024 07:35:21 +0000 (10:35 +0300)
committerMark Brown <broonie@kernel.org>
Mon, 8 Apr 2024 12:58:57 +0000 (13:58 +0100)
commit7ab681ddedd4b6dd2b047c74af95221c5f827e1d
tree97be277558ef5a62a458561531c75d21c1464476
parentfec50db7033ea478773b159e0e2efb135270e3b7
regulator: irq_helpers: duplicate IRQ name

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>
Link: https://msgid.link/r/ZhJMuUYwaZbBXFGP@drtxq0yyyyyyyyyyyyydy-3.rev.dnainternet.fi
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/irq_helpers.c