summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/imx-audio-rpmsg.c
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2021-06-02 11:26:10 +0300
committerMark Brown <broonie@kernel.org>2021-06-03 15:59:57 +0300
commitb82d0759a3b1e23d4247523c89bdfb27fffb6089 (patch)
tree2175c00ef22bebce6e305cece15237c9f31636e8 /sound/soc/fsl/imx-audio-rpmsg.c
parent6522a8486c00d130a32a57c6c8a365572958b4df (diff)
downloadlinux-b82d0759a3b1e23d4247523c89bdfb27fffb6089.tar.xz
ASoC: imx-audio-rpmsg: use module_rpmsg_driver to simplify the code
module_rpmsg_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20210602082610.3828408-1-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/fsl/imx-audio-rpmsg.c')
-rw-r--r--sound/soc/fsl/imx-audio-rpmsg.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/sound/soc/fsl/imx-audio-rpmsg.c b/sound/soc/fsl/imx-audio-rpmsg.c
index 50099bcaa9cd..905c3a071300 100644
--- a/sound/soc/fsl/imx-audio-rpmsg.c
+++ b/sound/soc/fsl/imx-audio-rpmsg.c
@@ -122,17 +122,7 @@ static struct rpmsg_driver imx_audio_rpmsg_driver = {
.remove = imx_audio_rpmsg_remove,
};
-static int __init imx_audio_rpmsg_init(void)
-{
- return register_rpmsg_driver(&imx_audio_rpmsg_driver);
-}
-
-static void __exit imx_audio_rpmsg_exit(void)
-{
- unregister_rpmsg_driver(&imx_audio_rpmsg_driver);
-}
-module_init(imx_audio_rpmsg_init);
-module_exit(imx_audio_rpmsg_exit);
+module_rpmsg_driver(imx_audio_rpmsg_driver);
MODULE_DESCRIPTION("Freescale SoC Audio RPMSG interface");
MODULE_AUTHOR("Shengjiu Wang <shengjiu.wang@nxp.com>");