diff options
author | Yong Wu <yong.wu@mediatek.com> | 2021-01-26 07:00:55 +0100 |
---|---|---|
committer | Krzysztof Kozlowski <krzk@kernel.org> | 2021-01-26 20:47:51 +0100 |
commit | 50fc8d9232cdc64b9e9d1b9488452f153de52b69 (patch) | |
tree | 67bd071ad3502a5327ef6e27c7f4dee134fc80af /drivers/memory/mtk-smi.c | |
parent | memory: ti-aemif: Drop child node when jumping out loop (diff) | |
download | linux-50fc8d9232cdc64b9e9d1b9488452f153de52b69.tar.xz linux-50fc8d9232cdc64b9e9d1b9488452f153de52b69.zip |
memory: mtk-smi: Allow building as module
Add support for building the SMI driver as module. Switch MTK_SMI to
tristate, and add module_exit/module_license.
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Link: https://lore.kernel.org/r/20210126060055.11050-1-yong.wu@mediatek.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Diffstat (limited to 'drivers/memory/mtk-smi.c')
-rw-r--r-- | drivers/memory/mtk-smi.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c index c07bb0b3144b..40c02d7315f6 100644 --- a/drivers/memory/mtk-smi.c +++ b/drivers/memory/mtk-smi.c @@ -597,3 +597,12 @@ static int __init mtk_smi_init(void) return platform_register_drivers(smidrivers, ARRAY_SIZE(smidrivers)); } module_init(mtk_smi_init); + +static void __exit mtk_smi_exit(void) +{ + platform_unregister_drivers(smidrivers, ARRAY_SIZE(smidrivers)); +} +module_exit(mtk_smi_exit); + +MODULE_DESCRIPTION("MediaTek SMI driver"); +MODULE_LICENSE("GPL v2"); |