On Thu Sep 3 01:36:58 2026 +0530, Mukesh Ojha wrote:
> Replace the hand-rolled devm_hdmirx_of_reserved_mem_device_release()
> devres action with devm_of_reserved_mem_device_init(), which handles the
> cleanup automatically. This removes both the wrapper function and the
> devm_add_action_or_reset() call.
>
> Reviewed-by: Dmitry Osipenko <[email protected]>
> Signed-off-by: Mukesh Ojha <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>
Patch committed.
Thanks,
Hans Verkuil
drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
---
diff --git a/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c
b/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c
index 978bc91d3257..3aff624c211a 100644
--- a/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c
+++ b/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c
@@ -2274,11 +2274,6 @@ static const struct hdmirx_cec_ops hdmirx_cec_ops = {
.read = hdmirx_readl,
};
-static void devm_hdmirx_of_reserved_mem_device_release(void *dev)
-{
- of_reserved_mem_device_release(dev);
-}
-
static int hdmirx_parse_dt(struct snps_hdmirx_dev *hdmirx_dev)
{
struct device *dev = hdmirx_dev->dev;
@@ -2332,16 +2327,9 @@ static int hdmirx_parse_dt(struct snps_hdmirx_dev
*hdmirx_dev)
if (!device_property_read_bool(dev, "hpd-is-active-low"))
hdmirx_dev->hpd_trigger_level_high = true;
- ret = of_reserved_mem_device_init(dev);
- if (ret) {
+ ret = devm_of_reserved_mem_device_init(dev);
+ if (ret)
dev_warn(dev, "no reserved memory for HDMIRX, use default
CMA\n");
- } else {
- ret = devm_add_action_or_reset(dev,
-
devm_hdmirx_of_reserved_mem_device_release,
- dev);
- if (ret)
- return ret;
- }
return 0;
}
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]