FAILED: patch "[PATCH] media: meson-ir-tx: Ensure rc_free_device() is called on unbind" failed to apply to 6.6-stable tree
Sasha Levin
maintainerThe patch below does not apply to the 6.6-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x 32999b8a9d5c4f497c9739e70ac4ee390cd650a7
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '[email protected]' --subject-prefix 'PATCH 6.6.y' 'HEAD^..'
Thanks,
Sasha
------------------ original commit in Linus's tree ------------------
From 32999b8a9d5c4f497c9739e70ac4ee390cd650a7 Mon Sep 17 00:00:00 2001
From: Sean Young <[email protected]>
Date: Mon, 6 Jul 2026 19:24:59 +0100
Subject: [PATCH] media: meson-ir-tx: Ensure rc_free_device() is called on
unbind
Make rc_dev devm managed.
--- drivers/media/rc/meson-ir-tx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/media/rc/meson-ir-tx.c +2 -4
@@ -346,7 +346,7 @@ static int meson_irtx_probe(struct platform_device *pdev)if (ret)return dev_err_probe (dev, ret,"irq request failed\n" ); - rc =rc_allocate_device (RC_DRIVER_IR_RAW_TX ); + rc =devm_rc_allocate_device (dev,RC_DRIVER_IR_RAW_TX );if (!rc)return -ENOMEM ;
@@ -359,10 +359,8 @@ static int meson_irtx_probe(struct platform_device *pdev) rc->s_tx_duty_cycle = meson_irtx_set_duty_cycle; ret =devm_rc_register_device (dev, rc); -if (ret <0 ) { -rc_free_device (rc); +if (ret <0 )return dev_err_probe (dev, ret,"rc_dev registration failed\n" ); - }return 0 ; }
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 1/3 media: meson-ir-tx: Convert to use devm_rc_register_device()
From: Uwe Kleine-König <[email protected]>
[ Upstream commit 12be815fbfd4c31aae4b23491b6dcf88a1e69299 ]
With that the remove callback can go away and also setting driver data becomes superfluous.
Stable-dep-of: 32999b8a9d5c ("media: meson-ir-tx: Ensure rc_free_device() is called on unbind")
--- drivers/media/rc/meson-ir-tx.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)
drivers/media/rc/meson-ir-tx.c +1 -11
@@ -364,25 +364,16 @@ static int __init meson_irtx_probe(struct platform_device *pdev) rc->s_tx_carrier = meson_irtx_set_carrier; rc->s_tx_duty_cycle = meson_irtx_set_duty_cycle; - ret =rc_register_device (rc); + ret =devm_rc_register_device (dev, rc);if (ret <0 ) {dev_err (dev,"rc_dev registration failed\n" );rc_free_device (rc);return ret; } -platform_set_drvdata (pdev, rc); -return 0 ; } -static void meson_irtx_remove (struct platform_device *pdev) -{ -struct rc_dev *rc =platform_get_drvdata (pdev); - -rc_unregister_device (rc); -} -static const struct of_device_id meson_irtx_dt_match[] = { { .compatible ="amlogic,meson-g12a-ir-tx" ,
@@ -392,7 +383,6 @@ static const struct of_device_id meson_irtx_dt_match[] = {MODULE_DEVICE_TABLE (of, meson_irtx_dt_match);static struct platform_driver meson_irtx_pd = { - .remove_new = meson_irtx_remove, .driver = { .name =DRIVER_NAME , .of_match_table = meson_irtx_dt_match,
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 2/3 media: meson-ir-tx: Simplify and improve using dev_err_probe()
From: Uwe Kleine-König <[email protected]>
[ Upstream commit 9af7c980f3ea3e85418beb25dc4d34939183e436 ]
With dev_err_probe() the error paths can be implemented in a more condensed way with the added benefit that the error code is added to the error messages by name.
Stable-dep-of: 32999b8a9d5c ("media: meson-ir-tx: Ensure rc_free_device() is called on unbind")
--- drivers/media/rc/meson-ir-tx.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-)
drivers/media/rc/meson-ir-tx.c +6 -10
@@ -337,20 +337,17 @@ static int __init meson_irtx_probe(struct platform_device *pdev)spin_lock_init (&ir->lock); ret =meson_irtx_mod_clock_probe (ir, &clk_nr); -if (ret) { -dev_err (dev,"modulator clock setup failed\n" ); -return ret; - } +if (ret) +return dev_err_probe (dev, ret,"modulator clock setup failed\n" ); +meson_irtx_setup (ir, clk_nr); ret =devm_request_irq (dev, irq, meson_irtx_irqhandler,IRQF_TRIGGER_RISING ,DRIVER_NAME , ir); -if (ret) { -dev_err (dev,"irq request failed\n" ); -return ret; - } +if (ret) +return dev_err_probe (dev, ret,"irq request failed\n" ); rc =rc_allocate_device (RC_DRIVER_IR_RAW_TX );if (!rc)
@@ -366,9 +363,8 @@ static int __init meson_irtx_probe(struct platform_device *pdev) ret =devm_rc_register_device (dev, rc);if (ret <0 ) { -dev_err (dev,"rc_dev registration failed\n" );rc_free_device (rc); -return ret; +return dev_err_probe (dev, ret,"rc_dev registration failed\n" ); }return 0 ;
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 3/3 media: meson-ir-tx: Ensure rc_free_device() is called on unbind
In reply to Sasha LevinFrom: Sean Young <[email protected]>
[ Upstream commit 32999b8a9d5c4f497c9739e70ac4ee390cd650a7 ]
Make rc_dev devm managed.
--- drivers/media/rc/meson-ir-tx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/media/rc/meson-ir-tx.c +2 -4
@@ -349,7 +349,7 @@ static int __init meson_irtx_probe(struct platform_device *pdev)if (ret)return dev_err_probe (dev, ret,"irq request failed\n" ); - rc =rc_allocate_device (RC_DRIVER_IR_RAW_TX ); + rc =devm_rc_allocate_device (dev,RC_DRIVER_IR_RAW_TX );if (!rc)return -ENOMEM ;
@@ -362,10 +362,8 @@ static int __init meson_irtx_probe(struct platform_device *pdev) rc->s_tx_duty_cycle = meson_irtx_set_duty_cycle; ret =devm_rc_register_device (dev, rc); -if (ret <0 ) { -rc_free_device (rc); +if (ret <0 )return dev_err_probe (dev, ret,"rc_dev registration failed\n" ); - }return 0 ; }
Signature · 1 line
2.53.0