reset: meson-audio-arb: Fix missing .owner setting of reset_controller_dev [Linux 5.1]

reset: meson-audio-arb: Fix missing .owner setting of reset_controller_dev [Linux 5.1]

This Linux kernel change "reset: meson-audio-arb: Fix missing .owner setting of reset_controller_dev" is included in the Linux 5.1 release. This change is authored by Axel Lin <axel.lin [at] ingics.com> on Mon Mar 18 22:03:52 2019 +0800. The commit for this change in Linux stable tree is 13e8a05 (patch).

reset: meson-audio-arb: Fix missing .owner setting of reset_controller_dev

Set .owner to prevent module unloading while being used.

Signed-off-by: Axel Lin <[email protected]>
Fixes: d903779b58be ("reset: meson: add meson audio arb driver")
Signed-off-by: Philipp Zabel <[email protected]>

There is one line of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/reset/reset-meson-audio-arb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/reset/reset-meson-audio-arb.c b/drivers/reset/reset-meson-audio-arb.c
index 9175161..c53a218 100644
--- a/drivers/reset/reset-meson-audio-arb.c
+++ b/drivers/reset/reset-meson-audio-arb.c
@@ -130,6 +130,7 @@ static int meson_audio_arb_probe(struct platform_device *pdev)
    arb->rstc.nr_resets = ARRAY_SIZE(axg_audio_arb_reset_bits);
    arb->rstc.ops = &meson_audio_arb_rstc_ops;
    arb->rstc.of_node = dev->of_node;
+   arb->rstc.owner = THIS_MODULE;

    /*
     * Enable general :

Leave a Reply

Your email address will not be published. Required fields are marked *