diff mbox series

soc: qcom: cmd-db: Fix compilation error when CMD_DB is disabled

Message ID 20200227125615.4727-1-sibis@codeaurora.org (mailing list archive)
State Accepted
Commit 7ad18bb5c2c4bd50c8b83d375ee19be992022cf3
Headers show
Series soc: qcom: cmd-db: Fix compilation error when CMD_DB is disabled | expand

Commit Message

Sibi Sankar Feb. 27, 2020, 12:56 p.m. UTC
If CONFIG_QCOM_COMMAND_DB=n the following compilation errors will be
seen. Fix this by including the appropriate linux headers.

./include/soc/qcom/cmd-db.h: In function ‘cmd_db_read_aux_data’:
./include/soc/qcom/cmd-db.h: error: implicit declaration of function ‘ERR_PTR’;

Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
---
 include/soc/qcom/cmd-db.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Stephen Boyd Feb. 27, 2020, 9:53 p.m. UTC | #1
Quoting Sibi Sankar (2020-02-27 04:56:15)
> If CONFIG_QCOM_COMMAND_DB=n the following compilation errors will be
> seen. Fix this by including the appropriate linux headers.
> 
> ./include/soc/qcom/cmd-db.h: In function \u2018cmd_db_read_aux_data\u2019:
> ./include/soc/qcom/cmd-db.h: error: implicit declaration of function \u2018ERR_PTR\u2019;
> 
> Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
> ---

Reviewed-by: Stephen Boyd <sboyd@kernel.org>
diff mbox series

Patch

diff --git a/include/soc/qcom/cmd-db.h b/include/soc/qcom/cmd-db.h
index af97222239251..c8bb56e6852a8 100644
--- a/include/soc/qcom/cmd-db.h
+++ b/include/soc/qcom/cmd-db.h
@@ -4,6 +4,7 @@ 
 #ifndef __QCOM_COMMAND_DB_H__
 #define __QCOM_COMMAND_DB_H__
 
+#include <linux/err.h>
 
 enum cmd_db_hw_type {
 	CMD_DB_HW_INVALID = 0,