aboutsummaryrefslogtreecommitdiff
path: root/drivers/nvmem
diff options
context:
space:
mode:
authorGravatar Johan Hovold <johan+linaro@kernel.org> 2023-02-06 13:43:54 +0000
committerGravatar Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2023-02-06 19:06:59 +0100
commiteb7dda20f42a9137e9ee53d5ed3b743d49338cb5 (patch)
tree14640723cb2d80af910d7dbb8ee957530078417d /drivers/nvmem
parentnvmem: rave-sp-eeprm: fix kernel-doc bad line warning (diff)
downloadlinux-eb7dda20f42a9137e9ee53d5ed3b743d49338cb5.tar.gz
linux-eb7dda20f42a9137e9ee53d5ed3b743d49338cb5.tar.bz2
linux-eb7dda20f42a9137e9ee53d5ed3b743d49338cb5.zip
nvmem: qcom-spmi-sdam: register at device init time
There are currently no in-tree users of the Qualcomm SDAM nvmem driver and there is generally no point in registering a driver that can be built as a module at subsys init time. Register the driver at the normal device init time instead and let driver core sort out the probe order. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Bjorn Andersson <andersson@kernel.org> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230206134356.839737-21-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/nvmem')
-rw-r--r--drivers/nvmem/qcom-spmi-sdam.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/nvmem/qcom-spmi-sdam.c b/drivers/nvmem/qcom-spmi-sdam.c
index 8499892044b7..f822790db49e 100644
--- a/drivers/nvmem/qcom-spmi-sdam.c
+++ b/drivers/nvmem/qcom-spmi-sdam.c
@@ -175,18 +175,7 @@ static struct platform_driver sdam_driver = {
},
.probe = sdam_probe,
};
-
-static int __init sdam_init(void)
-{
- return platform_driver_register(&sdam_driver);
-}
-subsys_initcall(sdam_init);
-
-static void __exit sdam_exit(void)
-{
- return platform_driver_unregister(&sdam_driver);
-}
-module_exit(sdam_exit);
+module_platform_driver(sdam_driver);
MODULE_DESCRIPTION("QCOM SPMI SDAM driver");
MODULE_LICENSE("GPL v2");