summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorZach Johnson <zachoverflow@google.com>2014-10-20 13:22:43 -0700
committerAndre Eisenbach <eisenbach@google.com>2015-03-16 16:51:36 -0700
commit9df3c8cb90caea19b96a84aedec6f275b7b53b70 (patch)
tree638d70f503aed01c99eabb2d5d07a2f7a3233cac /main
parente623c26bb2e14c2fa7cf76d55e51d93c1ac42782 (diff)
downloadandroid_system_bt-9df3c8cb90caea19b96a84aedec6f275b7b53b70.tar.gz
android_system_bt-9df3c8cb90caea19b96a84aedec6f275b7b53b70.tar.bz2
android_system_bt-9df3c8cb90caea19b96a84aedec6f275b7b53b70.zip
Remove a bunch of always-false macros
Referenced missing header files, so they wouldn't even compile if set to true.
Diffstat (limited to 'main')
-rw-r--r--main/bte_init.c215
-rw-r--r--main/bte_logmsg.c21
2 files changed, 1 insertions, 235 deletions
diff --git a/main/bte_init.c b/main/bte_init.c
index bef720664..94baf36e0 100644
--- a/main/bte_init.c
+++ b/main/bte_init.c
@@ -47,44 +47,6 @@
#include "gap_api.h"
#endif
-#if (defined(SPP_INCLUDED) && SPP_INCLUDED == TRUE)
-#include "spp_api.h"
-#endif
-
-#if (defined(OPP_INCLUDED) && OPP_INCLUDED == TRUE)
-#include "opp_api.h"
-#endif /* OPP */
-
-#if (defined(BIP_INCLUDED) && BIP_INCLUDED == TRUE)
-#include "bip_api.h"
-#endif
-
-#if (defined(BTA_BI_INCLUDED) && BTA_BI_INCLUDED == TRUE)
-#include "bta_bi_api.h"
-#endif
-
-#if (defined(HFP_INCLUDED) && HFP_INCLUDED == TRUE)
-#include "hfp_api.h"
-#endif
-
-#if ((defined(HSP2_INCLUDED) && HSP2_INCLUDED == TRUE)) || \
- ((defined(HFP_INCLUDED) && HFP_INCLUDED == TRUE))
-#include "hsp2_api.h"
-#endif
-
-#if (defined(HCRP_INCLUDED) && HCRP_INCLUDED == TRUE)
-#if (defined(HCRP_CLIENT_INCLUDED) && HCRP_CLIENT_INCLUDED == TRUE)
-#include "hcrp_api.h"
-#endif
-#if (defined(HCRP_SERVER_INCLUDED) && HCRP_SERVER_INCLUDED == TRUE)
-#include "hcrpm_api.h"
-#endif
-#endif
-
-#if (defined(BPP_INCLUDED) && BPP_INCLUDED == TRUE)
-#include "bpp_api.h"
-#endif
-
#if (defined(PAN_INCLUDED) && PAN_INCLUDED == TRUE)
#include "pan_api.h"
#endif
@@ -97,19 +59,10 @@
#include "a2d_api.h"
#endif
-
-#if (defined(HID_DEV_INCLUDED) && HID_DEV_INCLUDED == TRUE)
-#include "hidd_api.h"
-#endif
-
#if (defined(HID_HOST_INCLUDED) && HID_HOST_INCLUDED == TRUE)
#include "hidh_api.h"
#endif
-#if (defined(SAP_SERVER_INCLUDED) && SAP_SERVER_INCLUDED == TRUE)
-#include "sap_api.h"
-#endif /* SAP_SERVER_INCLUDED */
-
#if (defined(MCA_INCLUDED) && MCA_INCLUDED == TRUE)
#include "mca_api.h"
#endif
@@ -121,17 +74,11 @@
#endif
#endif
-// btla-specific ++
/***** BTA Modules ******/
#if BTA_INCLUDED == TRUE && BTA_DYNAMIC_MEMORY == TRUE
#include "bta_api.h"
#include "bta_sys.h"
-#if BTA_AC_INCLUDED == TRUE
-#include "bta_acs_int.h"
-#include "bta_acc_int.h"
-#endif
-
#if BTA_AG_INCLUDED == TRUE
#include "bta_ag_int.h"
#endif
@@ -142,50 +89,10 @@
#include "bta_dm_int.h"
-#if BTA_DG_INCLUDED == TRUE
-#include "bta_dg_api.h"
-#include "bta_dg_int.h"
-#endif
-
-#if BTA_FT_INCLUDED == TRUE
-#include "bta_ftc_int.h"
-#include "bta_fts_int.h"
-#endif
-
-#if BTA_PBC_INCLUDED == TRUE
-#include "bta_pbc_int.h"
-#endif
-
#if BTA_PBS_INCLUDED == TRUE
#include "bta_pbs_int.h"
#endif
-#if BTA_OP_INCLUDED == TRUE
-#include "bta_opc_int.h"
-#include "bta_ops_int.h"
-#endif
-
-#if BTA_SS_INCLUDED==TRUE
-#include "bta_ss_int.h"
-#endif
-
-#if BTA_CT_INCLUDED==TRUE
-#include "bta_ct_int.h"
-#endif
-
-#if BTA_CG_INCLUDED==TRUE
-#include "bta_cg_int.h"
-#endif
-
-#if BTA_BI_INCLUDED==TRUE
-#include "bta_bic_int.h"
-#include "bta_bis_int.h"
-#endif
-
-#if BTA_PR_INCLUDED==TRUE
-#include "bta_pr_int.h"
-#endif
-
#if BTA_AR_INCLUDED==TRUE
#include "bta_ar_int.h"
#endif
@@ -193,39 +100,15 @@
#include "bta_av_int.h"
#endif
-#if BTA_SC_INCLUDED==TRUE
-#include "bta_sc_int.h"
-#endif
-
-#if BTA_HD_INCLUDED==TRUE
-#include "bta_hd_int.h"
-#endif
-
#if BTA_HH_INCLUDED==TRUE
#include "bta_hh_int.h"
#endif
-#if BTA_FM_INCLUDED==TRUE
-#include "bta_fm_int.h"
-#endif
-
-#if BTA_FMTX_INCLUDED==TRUE
-#include "bta_fmtx_int.h"
-#endif
-
#if BTA_JV_INCLUDED==TRUE
#include "bta_jv_int.h"
tBTA_JV_CB *bta_jv_cb_ptr = NULL;
#endif
-#if BTA_MCE_INCLUDED == TRUE
-#include "bta_mce_int.h"
-#endif
-
-#if BTA_MSE_INCLUDED == TRUE
-#include "bta_mse_int.h"
-#endif
-
#if BTA_HL_INCLUDED == TRUE
#include "bta_hl_int.h"
#endif
@@ -245,7 +128,6 @@ tBTA_JV_CB *bta_jv_cb_ptr = NULL;
#include "bta_prm_int.h"
#endif /* BTA_INCLUDED */
-// btla-specific --
/*****************************************************************************
** F U N C T I O N S *
@@ -276,37 +158,11 @@ void BTE_InitStack(void)
#if (defined(RFCOMM_INCLUDED) && RFCOMM_INCLUDED == TRUE)
RFCOMM_Init();
-#if (defined(SPP_INCLUDED) && SPP_INCLUDED == TRUE)
- SPP_Init();
-#endif /* SPP */
-
-#if (defined(HSP2_INCLUDED) && HSP2_INCLUDED == TRUE)
- HSP2_Init();
-#endif /* HSP2 */
-
-#if (defined(HFP_INCLUDED) && HFP_INCLUDED == TRUE)
- HFP_Init();
-#endif /* HFP */
-
/**************************
** OBEX and its profiles **
***************************/
#if (defined(OBX_INCLUDED) && OBX_INCLUDED == TRUE)
OBX_Init();
-#if (defined(BIP_INCLUDED) && BIP_INCLUDED == TRUE)
- BIP_Init();
-#if (defined(BTA_BI_INCLUDED) && BTA_BI_INCLUDED == TRUE)
- BTA_BicInit();
-#endif /* BTA BI */
-#endif /* BIP */
-
-#if (defined(OPP_INCLUDED) && OPP_INCLUDED == TRUE)
- OPP_Init();
-#endif
-
-#if (defined(BPP_INCLUDED) && BPP_INCLUDED == TRUE)
- BPP_Init();
-#endif /* BPP */
#endif /* OBX */
@@ -344,34 +200,17 @@ void BTE_InitStack(void)
GAP_Init();
#endif /* GAP Included */
-#if (defined(HCRP_INCLUDED) && HCRP_INCLUDED == TRUE)
-#if (defined(HCRP_CLIENT_INCLUDED) && HCRP_CLIENT_INCLUDED == TRUE)
- HCRP_Init();
-#endif
-#if (defined(HCRP_SERVER_INCLUDED) && HCRP_SERVER_INCLUDED == TRUE)
- HCRPM_Init();
-#endif
-#endif /* HCRP Included */
-
-#if (defined(SAP_SERVER_INCLUDED) && SAP_SERVER_INCLUDED == TRUE)
- SAP_Init();
-#endif /* SAP_SERVER_INCLUDED */
-
-#if (defined(HID_DEV_INCLUDED) && HID_DEV_INCLUDED == TRUE)
- HID_DevInit();
-#endif
#if (defined(HID_HOST_INCLUDED) && HID_HOST_INCLUDED == TRUE)
HID_HostInit();
#endif
#if (defined(MCA_INCLUDED) && MCA_INCLUDED == TRUE)
MCA_Init();
-#endif /* SAP_SERVER_INCLUDED */
+#endif
/****************
** BTA Modules **
*****************/
-// btla-specific ++
#if (BTA_INCLUDED == TRUE && BTA_DYNAMIC_MEMORY == TRUE)
memset((void*)bta_sys_cb_ptr, 0, sizeof(tBTA_SYS_CB));
memset((void*)bta_dm_cb_ptr, 0, sizeof(tBTA_DM_CB));
@@ -379,75 +218,24 @@ void BTE_InitStack(void)
memset((void*)bta_dm_di_cb_ptr, 0, sizeof(tBTA_DM_DI_CB));
memset((void*)bta_prm_cb_ptr, 0, sizeof(tBTA_PRM_CB));
-#if BTA_AC_INCLUDED == TRUE
- memset((void*)bta_acc_cb_ptr, 0, sizeof(tBTA_ACC_CB));
- memset((void*)bta_acs_cb_ptr, 0, sizeof(tBTA_ACS_CB));
-#endif
#if BTA_AG_INCLUDED == TRUE
memset((void*)bta_ag_cb_ptr, 0, sizeof(tBTA_AG_CB));
#endif
#if BTA_HS_INCLUDED == TRUE
memset((void*)bta_hs_cb_ptr, 0, sizeof(tBTA_HS_CB));
#endif
-#if BTA_DG_INCLUDED == TRUE
- memset((void*)bta_dg_cb_ptr, 0, sizeof(tBTA_DG_CB));
-#endif
-#if BTA_FT_INCLUDED==TRUE
- memset((void*)bta_ftc_cb_ptr, 0, sizeof(tBTA_FTC_CB));
- memset((void*)bta_fts_cb_ptr, 0, sizeof(tBTA_FTS_CB));
-#endif
-#if BTA_PBC_INCLUDED==TRUE
- memset((void*)bta_pbc_cb_ptr, 0, sizeof(tBTA_PBC_CB));
-#endif
#if BTA_PBS_INCLUDED==TRUE
memset((void*)bta_pbs_cb_ptr, 0, sizeof(tBTA_PBS_CB));
#endif
-#if BTA_OP_INCLUDED==TRUE
- memset((void*)bta_opc_cb_ptr, 0, sizeof(tBTA_OPC_CB));
- memset((void*)bta_ops_cb_ptr, 0, sizeof(tBTA_OPS_CB));
-#endif
-#if BTA_SS_INCLUDED==TRUE
- memset((void*)bta_ss_cb_ptr, 0, sizeof(tBTA_SS_CB));
-#endif
-#if BTA_CT_INCLUDED==TRUE
- memset((void*)bta_ct_cb_ptr, 0, sizeof(tBTA_CT_CB));
-#endif
-#if BTA_CG_INCLUDED==TRUE
- memset((void*)bta_cg_cb_ptr, 0, sizeof(tBTA_CG_CB));
-#endif
-#if BTA_BI_INCLUDED==TRUE
- memset((void *)bta_bic_cb_ptr, 0, sizeof(tBTA_BIC_CB));
- memset((void *)bta_bis_cb_ptr, 0, sizeof(tBTA_BIS_CB));
-#endif
#if BTA_AR_INCLUDED==TRUE
memset((void *)bta_ar_cb_ptr, 0, sizeof(tBTA_AR_CB));
#endif
#if BTA_AV_INCLUDED==TRUE
memset((void *)bta_av_cb_ptr, 0, sizeof(tBTA_AV_CB));
#endif
-#if BTA_PR_INCLUDED==TRUE
- memset((void *)bta_pr_cb_ptr, 0, sizeof(tBTA_PR_CB));
-#endif
-#if BTA_SC_INCLUDED==TRUE
- memset((void *)bta_sc_cb_ptr, 0, sizeof(tBTA_SC_CB));
-#endif
-#if BTA_HD_INCLUDED==TRUE
- memset((void *)bta_hd_cb_ptr, 0, sizeof(tBTA_HD_CB));
-#endif
#if BTA_HH_INCLUDED==TRUE
memset((void *)bta_hh_cb_ptr, 0, sizeof(tBTA_HH_CB));
#endif
-#if BTA_FM_INCLUDED==TRUE
- memset((void *)bta_fm_cb_ptr, 0, sizeof(tBTA_FM_CB));
-#endif
-#if BTA_FMTX_INCLUDED==TRUE
- memset((void *)bta_fmtx_cb_ptr, 0, sizeof(tBTA_FMTX_CB));
-#endif
-#if 0
-#if BTA_JV_INCLUDED==TRUE
- memset((void *)bta_jv_cb_ptr, 0, sizeof(tBTA_JV_CB));
-#endif
-#endif
#if BTA_HL_INCLUDED==TRUE
memset((void *)bta_hl_cb_ptr, 0, sizeof(tBTA_HL_CB));
#endif
@@ -460,6 +248,5 @@ void BTE_InitStack(void)
#endif
#endif /* BTA_INCLUDED == TRUE */
-// btla-specific --
}
diff --git a/main/bte_logmsg.c b/main/bte_logmsg.c
index 16209c5be..5105a7de4 100644
--- a/main/bte_logmsg.c
+++ b/main/bte_logmsg.c
@@ -55,22 +55,13 @@
#if (A2D_INCLUDED==TRUE)
#include "a2d_api.h"
#endif
-#if (BIP_INCLUDED==TRUE)
-#include "bip_api.h"
-#endif
#if (BNEP_INCLUDED==TRUE)
#include "bnep_api.h"
#endif
-#if (BPP_INCLUDED==TRUE)
-#include "bpp_api.h"
-#endif
#include "btm_api.h"
#if (GAP_INCLUDED==TRUE)
#include "gap_api.h"
#endif
-#if (HCRP_INCLUDED==TRUE)
-#include "hcrp_api.h"
-#endif
#if (PAN_INCLUDED==TRUE)
#include "pan_api.h"
#endif
@@ -179,28 +170,16 @@ static tBTTRC_FUNC_MAP bttrc_set_level_map[] = {
#if (A2D_INCLUDED==TRUE)
{BTTRC_ID_STK_A2D, BTTRC_ID_STK_A2D, A2D_SetTraceLevel, "TRC_A2D", DEFAULT_CONF_TRACE_LEVEL},
#endif
-#if (BIP_INCLUDED==TRUE)
- {BTTRC_ID_STK_BIP, BTTRC_ID_STK_BIP, BIP_SetTraceLevel, "TRC_BIP", DEFAULT_CONF_TRACE_LEVEL},
-#endif
#if (BNEP_INCLUDED==TRUE)
{BTTRC_ID_STK_BNEP, BTTRC_ID_STK_BNEP, BNEP_SetTraceLevel, "TRC_BNEP", DEFAULT_CONF_TRACE_LEVEL},
#endif
-#if (BPP_INCLUDED==TRUE)
- {BTTRC_ID_STK_BPP, BTTRC_ID_STK_BPP, BPP_SetTraceLevel, "TRC_BPP", DEFAULT_CONF_TRACE_LEVEL},
-#endif
{BTTRC_ID_STK_BTM_ACL, BTTRC_ID_STK_BTM_SEC, BTM_SetTraceLevel, "TRC_BTM", DEFAULT_CONF_TRACE_LEVEL},
#if (GAP_INCLUDED==TRUE)
{BTTRC_ID_STK_GAP, BTTRC_ID_STK_GAP, GAP_SetTraceLevel, "TRC_GAP", DEFAULT_CONF_TRACE_LEVEL},
#endif
-#if (HCRP_INCLUDED==TRUE)
- {BTTRC_ID_STK_HCRP, BTTRC_ID_STK_HCRP, HCRP_SetTraceLevel, "TRC_HCRP", DEFAULT_CONF_TRACE_LEVEL},
-#endif
#if (PAN_INCLUDED==TRUE)
{BTTRC_ID_STK_PAN, BTTRC_ID_STK_PAN, PAN_SetTraceLevel, "TRC_PAN", DEFAULT_CONF_TRACE_LEVEL},
#endif
-#if (SAP_SERVER_INCLUDED==TRUE)
- {BTTRC_ID_STK_SAP, BTTRC_ID_STK_SAP, NULL, "TRC_SAP", DEFAULT_CONF_TRACE_LEVEL},
-#endif
{BTTRC_ID_STK_SDP, BTTRC_ID_STK_SDP, SDP_SetTraceLevel, "TRC_SDP", DEFAULT_CONF_TRACE_LEVEL},
#if (BLE_INCLUDED==TRUE)
{BTTRC_ID_STK_GATT, BTTRC_ID_STK_GATT, GATT_SetTraceLevel, "TRC_GATT", DEFAULT_CONF_TRACE_LEVEL},