From 75afa532e78acc2aff50ade7813a11e31995dc91 Mon Sep 17 00:00:00 2001 From: Lina Iyer Date: Tue, 16 Jul 2019 16:32:10 -0600 Subject: [PATCH] drivers: qcom: cmd-db: modularize commandDB driver Add support for compiling commandDB as module. Since the command DB data is written to DDR by a remote processor and exists while the system is active, removing the module does not make sense. Initialize the driver as builtin platform driver. Change-Id: I3e8909f556815b6831947661531f1e4d3c464a86 Signed-off-by: Lina Iyer --- drivers/soc/qcom/Kconfig | 2 +- drivers/soc/qcom/cmd-db.c | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig index 3f8c6cdd9cb7..91d402cdf536 100644 --- a/drivers/soc/qcom/Kconfig +++ b/drivers/soc/qcom/Kconfig @@ -17,7 +17,7 @@ config QCOM_AOSS_QMP Subsystem (AOSS) using Qualcomm Messaging Protocol (QMP). config QCOM_COMMAND_DB - bool "Qualcomm Command DB" + tristate "Qualcomm Technologies, Inc. Command DB driver" depends on ARCH_QCOM || COMPILE_TEST depends on OF_RESERVED_MEM help diff --git a/drivers/soc/qcom/cmd-db.c b/drivers/soc/qcom/cmd-db.c index 528fdc7c4d5f..345c4b70a6f3 100644 --- a/drivers/soc/qcom/cmd-db.c +++ b/drivers/soc/qcom/cmd-db.c @@ -2,6 +2,7 @@ /* Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. */ #include +#include #include #include #include @@ -274,9 +275,7 @@ static struct platform_driver cmd_db_dev_driver = { .of_match_table = cmd_db_match_table, }, }; +builtin_platform_driver(cmd_db_dev_driver); -static int __init cmd_db_device_init(void) -{ - return platform_driver_register(&cmd_db_dev_driver); -} -arch_initcall(cmd_db_device_init); +MODULE_LICENSE("GPL v2"); +MODULE_DESCRIPTION("Qualcomm Technologies, Inc. CommandDB driver");