From 2ff2acc7cfd0ed3e355181efb9f449f94b675ec8 Mon Sep 17 00:00:00 2001 From: Ajay Singh Parmar Date: Mon, 18 May 2015 11:09:42 -0700 Subject: [PATCH] msm: dba: define null function to register client All clients need to call register API exposed by DBA module to check if the down stream transmitter driver is configured or not. In case DBA is not enabled, define a null register function which returns a NULL pointer to let the clients know of non availability of DBA. Change-Id: I2b6066babe5a7e464a31752720da8f299997e977 Signed-off-by: Ajay Singh Parmar Signed-off-by: Siddharth Zaveri --- include/video/msm_dba.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/video/msm_dba.h b/include/video/msm_dba.h index a0a3fdfbfcf1..7cc346ee0d33 100644 --- a/include/video/msm_dba.h +++ b/include/video/msm_dba.h @@ -487,8 +487,15 @@ struct msm_dba_ops { * chip. If Successful, this will return a pointer that should be used as a * handle for all subsequent function calls. */ +#ifdef CONFIG_MSM_DBA void *msm_dba_register_client(struct msm_dba_reg_info *info, struct msm_dba_ops *ops); +#else +static inline void *msm_dba_register_client(struct msm_dba_reg_info *info, + struct msm_dba_ops *ops) { + return NULL; +} +#endif /** * msm_dba_deregister_client() - Allows client to de-register with the driver.