OSDN Git Service

Get rid of unused BTA_DYNAMIC_MEMORY
authorJakub Pawlowski <jpawlowski@google.com>
Fri, 24 Jun 2016 21:05:58 +0000 (14:05 -0700)
committerJakub Pawlowski <jpawlowski@google.com>
Fri, 24 Jun 2016 21:05:58 +0000 (14:05 -0700)
Change-Id: Idc7fcddfecac9ab7d9800b496e2380ae277f357f

28 files changed:
bta/ag/bta_ag_int.h
bta/ag/bta_ag_main.c
bta/ar/bta_ar.c
bta/ar/bta_ar_int.h
bta/av/bta_av_int.h
bta/av/bta_av_main.c
bta/dm/bta_dm_int.h
bta/dm/bta_dm_main.cc
bta/gatt/bta_gattc_int.h
bta/gatt/bta_gattc_main.cc
bta/gatt/bta_gatts_int.h
bta/gatt/bta_gatts_main.cc
bta/hh/bta_hh_int.h
bta/hh/bta_hh_main.cc
bta/hl/bta_hl_int.h
bta/hl/bta_hl_main.c
bta/jv/bta_jv_int.h
bta/jv/bta_jv_main.c
bta/mce/bta_mce_int.h
bta/mce/bta_mce_main.c
bta/pan/bta_pan_int.h
bta/pan/bta_pan_main.c
bta/sdp/bta_sdp.c
bta/sdp/bta_sdp_int.h
bta/sys/bta_sys_int.h
bta/sys/bta_sys_main.c
main/bte_init.c
stack/include/dyn_mem.h

index acde78f..bfa2dae 100644 (file)
@@ -333,12 +333,7 @@ extern const uint8_t bta_ag_sec_id[BTA_AG_NUM_IDX];
 extern const tBTA_AG_AT_CMD *bta_ag_at_tbl[BTA_AG_NUM_IDX];
 
 /* control block declaration */
-#if (BTA_DYNAMIC_MEMORY == FALSE)
 extern tBTA_AG_CB bta_ag_cb;
-#else
-extern tBTA_AG_CB *bta_ag_cb_ptr;
-#define bta_ag_cb (*bta_ag_cb_ptr)
-#endif
 
 /* config struct */
 extern tBTA_AG_CFG *p_bta_ag_cfg;
index 293163b..7b9a0e3 100644 (file)
@@ -270,9 +270,7 @@ const tBTA_AG_ST_TBL bta_ag_st_tbl[] =
 *****************************************************************************/
 
 /* AG control block */
-#if BTA_DYNAMIC_MEMORY == FALSE
 tBTA_AG_CB  bta_ag_cb;
-#endif
 
 /*******************************************************************************
 **
index 2464620..dd0abf4 100644 (file)
@@ -28,9 +28,7 @@
 
 
 /* AV control block */
-#if BTA_DYNAMIC_MEMORY == FALSE
 tBTA_AR_CB  bta_ar_cb;
-#endif
 
 /*******************************************************************************
 **
index 2c142fc..a14b615 100644 (file)
@@ -54,11 +54,6 @@ typedef struct
 *****************************************************************************/
 
 /* control block declaration */
-#if BTA_DYNAMIC_MEMORY == FALSE
 extern tBTA_AR_CB bta_ar_cb;
-#else
-extern tBTA_AR_CB *bta_ar_cb_ptr;
-#define bta_ar_cb (*bta_ar_cb_ptr)
-#endif
 
 #endif /* BTA_AR_INT_H */
index de7a59c..2f729ee 100644 (file)
@@ -610,12 +610,7 @@ typedef struct
 *****************************************************************************/
 
 /* control block declaration */
-#if (BTA_DYNAMIC_MEMORY == FALSE)
 extern tBTA_AV_CB bta_av_cb;
-#else
-extern tBTA_AV_CB *bta_av_cb_ptr;
-#define bta_av_cb (*bta_av_cb_ptr)
-#endif
 
 /* config struct */
 extern tBTA_AV_CFG *p_bta_av_cfg;
index 556d97c..8c7a771 100644 (file)
@@ -199,9 +199,7 @@ const tBTA_AV_NSM_ACT bta_av_nsm_act[] =
 *****************************************************************************/
 
 /* AV control block */
-#if (BTA_DYNAMIC_MEMORY == FALSE)
 tBTA_AV_CB  bta_av_cb;
-#endif
 
 #if (BTA_AV_DEBUG == TRUE)
 static char *bta_av_st_code(uint8_t state);
index 4268a1f..ab1f532 100644 (file)
@@ -1048,28 +1048,13 @@ extern const tBTA_DM_EIR_CONF bta_dm_eir_cfg;
 extern tBTA_DM_EIR_CONF *p_bta_dm_eir_cfg;
 
 /* DM control block */
-#if (BTA_DYNAMIC_MEMORY == FALSE)
 extern tBTA_DM_CB  bta_dm_cb;
-#else
-extern tBTA_DM_CB *bta_dm_cb_ptr;
-#define bta_dm_cb (*bta_dm_cb_ptr)
-#endif
 
 /* DM search control block */
-#if (BTA_DYNAMIC_MEMORY == FALSE)
 extern tBTA_DM_SEARCH_CB  bta_dm_search_cb;
-#else
-extern tBTA_DM_SEARCH_CB *bta_dm_search_cb_ptr;
-#define bta_dm_search_cb (*bta_dm_search_cb_ptr)
-#endif
 
 /* DI control block */
-#if (BTA_DYNAMIC_MEMORY == FALSE)
 extern tBTA_DM_DI_CB  bta_dm_di_cb;
-#else
-extern tBTA_DM_DI_CB *bta_dm_di_cb_ptr;
-#define bta_dm_di_cb (*bta_dm_di_cb_ptr)
-#endif
 
 extern bool bta_dm_sm_execute(BT_HDR *p_msg);
 extern void bta_dm_sm_disable( void );
index 50c622c..6dcb040 100644 (file)
 ** Constants and types
 *****************************************************************************/
 
-#if (BTA_DYNAMIC_MEMORY == FALSE)
 tBTA_DM_CB  bta_dm_cb;
 tBTA_DM_SEARCH_CB bta_dm_search_cb;
 tBTA_DM_DI_CB       bta_dm_di_cb;
-#endif
 
 
 #define BTA_DM_NUM_ACTIONS  (BTA_DM_MAX_EVT & 0x00ff)
index 44b0d3a..f7bafe8 100644 (file)
@@ -392,12 +392,7 @@ typedef struct
 *****************************************************************************/
 
 /* GATTC control block */
-#if (BTA_DYNAMIC_MEMORY == FALSE)
 extern tBTA_GATTC_CB  bta_gattc_cb;
-#else
-extern tBTA_GATTC_CB *bta_gattc_cb_ptr;
-#define bta_gattc_cb (*bta_gattc_cb_ptr)
-#endif
 
 /*****************************************************************************
 **  Function prototypes
index d676b24..239c25a 100644 (file)
@@ -243,9 +243,7 @@ const tBTA_GATTC_ST_TBL bta_gattc_st_tbl[] =
 *****************************************************************************/
 
 /* GATTC control block */
-#if (BTA_DYNAMIC_MEMORY == FALSE)
 tBTA_GATTC_CB  bta_gattc_cb;
-#endif
 
 #if (BTA_GATT_DEBUG == TRUE)
 static char *gattc_evt_code(tBTA_GATTC_INT_EVT evt_code);
index 8784e2e..69bda1f 100644 (file)
@@ -214,12 +214,7 @@ typedef struct
 *****************************************************************************/
 
 /* GATTC control block */
-#if (BTA_DYNAMIC_MEMORY == FALSE)
 extern tBTA_GATTS_CB  bta_gatts_cb;
-#else
-extern tBTA_GATTS_CB *bta_gatts_cb_ptr;
-    #define bta_gatts_cb (*bta_gatts_cb_ptr)
-#endif
 
 /*****************************************************************************
 **  Function prototypes
index 8a83907..5656ecc 100644 (file)
@@ -46,9 +46,7 @@ const tBTA_GATTS_SRVC_ACT bta_gatts_srvc_build_act[] =
 };
 
 /* GATTS control block */
-#if (BTA_DYNAMIC_MEMORY == FALSE)
 tBTA_GATTS_CB  bta_gatts_cb;
-#endif
 
 /*******************************************************************************
 **
index 064b186..da26472 100644 (file)
@@ -316,12 +316,7 @@ typedef struct
 }
 tBTA_HH_CB;
 
-#if (BTA_DYNAMIC_MEMORY == FALSE)
 extern tBTA_HH_CB  bta_hh_cb;
-#else
-extern tBTA_HH_CB *bta_hh_cb_ptr;
-#define bta_hh_cb (*bta_hh_cb_ptr)
-#endif
 
 /* from bta_hh_cfg.c */
 extern tBTA_HH_CFG *p_bta_hh_cfg;
index 1d565e0..50ae8b1 100644 (file)
@@ -245,9 +245,8 @@ const tBTA_HH_ST_TBL bta_hh_st_tbl[] =
 /*****************************************************************************
 ** Global data
 *****************************************************************************/
-#if (BTA_DYNAMIC_MEMORY == FALSE)
 tBTA_HH_CB  bta_hh_cb;
-#endif
+
 /*****************************************************************************
 ** Static functions
 *****************************************************************************/
index 0a83d6f..33a4155 100644 (file)
@@ -578,12 +578,7 @@ typedef struct
 *****************************************************************************/
 
 /* HL control block */
-#if (BTA_DYNAMIC_MEMORY == FALSE)
 extern tBTA_HL_CB  bta_hl_cb;
-#else
-extern tBTA_HL_CB *bta_hl_cb_ptr;
-    #define bta_hl_cb (*bta_hl_cb_ptr)
-#endif
 
 #define BTA_HL_GET_CB_PTR() &(bta_hl_cb)
 #define BTA_HL_GET_APP_CB_PTR(app_idx) &(bta_hl_cb.acb[(app_idx)])
index 4b3e8ab..c91ccfa 100644 (file)
@@ -400,10 +400,7 @@ const tBTA_HL_CCH_ST_TBL bta_hl_cch_st_tbl[] =
 *****************************************************************************/
 
 /* HL control block */
-#if (BTA_DYNAMIC_MEMORY == FALSE)
 tBTA_HL_CB  bta_hl_cb;
-#endif
-
 
 /*******************************************************************************
 **
index 4e91fc5..92e4eb9 100644 (file)
@@ -397,12 +397,7 @@ enum
 };
 
 /* JV control block */
-#if (BTA_DYNAMIC_MEMORY == FALSE)
 extern tBTA_JV_CB bta_jv_cb;
-#else
-extern tBTA_JV_CB *bta_jv_cb_ptr;
-#define bta_jv_cb (*bta_jv_cb_ptr)
-#endif
 
 /* config struct */
 extern tBTA_JV_CFG *p_bta_jv_cfg;
index d474a53..5162f3e 100644 (file)
@@ -31,9 +31,7 @@
 ** Constants and types
 *****************************************************************************/
 
-#if (BTA_DYNAMIC_MEMORY == FALSE)
 tBTA_JV_CB bta_jv_cb;
-#endif
 
 /* state machine action enumeration list */
 #define BTA_JV_NUM_ACTIONS  (BTA_JV_MAX_INT_EVT & 0x00ff)
index 925906e..d27575d 100644 (file)
@@ -79,12 +79,7 @@ enum
 };
 
 /* MCE control block */
-#if (BTA_DYNAMIC_MEMORY == FALSE)
 extern tBTA_MCE_CB bta_mce_cb;
-#else
-extern tBTA_MCE_CB *bta_mce_cb_ptr;
-#define bta_mce_cb (*bta_mce_cb_ptr)
-#endif
 
 /* config struct */
 extern tBTA_MCE_CFG *p_bta_mce_cfg;
index 632ee68..e418aa0 100644 (file)
@@ -33,9 +33,7 @@
 ** Constants and types
 *****************************************************************************/
 
-#if (BTA_DYNAMIC_MEMORY == FALSE)
 tBTA_MCE_CB bta_mce_cb;
-#endif
 
 /* state machine action enumeration list */
 #define BTA_MCE_NUM_ACTIONS  (BTA_MCE_MAX_INT_EVT & 0x00ff)
index cc619bc..472e9e0 100644 (file)
@@ -184,13 +184,7 @@ typedef struct
 *****************************************************************************/
 
 /* PAN control block */
-
-#if (BTA_DYNAMIC_MEMORY == FALSE)
 extern tBTA_PAN_CB  bta_pan_cb;
-#else
-extern tBTA_PAN_CB *bta_pan_cb_ptr;
-#define bta_pan_cb (*bta_pan_cb_ptr)
-#endif
 
 /*****************************************************************************
 **  Function prototypes
index 2d35c42..c262906 100644 (file)
@@ -147,9 +147,7 @@ const tBTA_PAN_ST_TBL bta_pan_st_tbl[] = {
 *****************************************************************************/
 
 /* PAN control block */
-#if (BTA_DYNAMIC_MEMORY == FALSE)
 tBTA_PAN_CB  bta_pan_cb;
-#endif
 
 /*******************************************************************************
 **
index 613159a..6654c40 100644 (file)
@@ -33,9 +33,7 @@
 ** Constants and types
 *****************************************************************************/
 
-#if (BTA_DYNAMIC_MEMORY == FALSE)
 tBTA_SDP_CB bta_sdp_cb;
-#endif
 
 /* state machine action enumeration list */
 #define BTA_SDP_NUM_ACTIONS  (BTA_SDP_MAX_INT_EVT & 0x00ff)
index 536e8e6..932adf5 100644 (file)
@@ -95,12 +95,7 @@ typedef struct
 
 
 /* SDP control block */
-#if (BTA_DYNAMIC_MEMORY == FALSE)
 extern tBTA_SDP_CB bta_sdp_cb;
-#else
-extern tBTA_SDP_CB *bta_sdp_cb_ptr;
-#define bta_sdp_cb (*bta_sdp_cb_ptr)
-#endif
 
 /* config struct */
 extern tBTA_SDP_CFG *p_bta_sdp_cfg;
index b81886e..3ac73f3 100644 (file)
@@ -83,12 +83,7 @@ typedef struct
 *****************************************************************************/
 
 /* system manager control block */
-#if (BTA_DYNAMIC_MEMORY == FALSE)
 extern tBTA_SYS_CB bta_sys_cb;
-#else
-extern tBTA_SYS_CB *bta_sys_cb_ptr;
-#define bta_sys_cb (*bta_sys_cb_ptr)
-#endif
 
 /* functions used for BTA SYS HW state machine */
 void bta_sys_hw_btm_cback( tBTM_DEV_STATUS status );
index 1938519..5f56b8c 100644 (file)
@@ -45,9 +45,7 @@
 #endif
 
 /* system manager control block definition */
-#if (BTA_DYNAMIC_MEMORY == FALSE)
 tBTA_SYS_CB bta_sys_cb;
-#endif
 
 fixed_queue_t *btu_bta_alarm_queue;
 extern thread_t *bt_workqueue_thread;
index e212f39..a0b8418 100644 (file)
 #endif
 #endif
 
-/***** BTA Modules ******/
-#if BTA_INCLUDED == TRUE && BTA_DYNAMIC_MEMORY == TRUE
-#include "bta_api.h"
-#include "bta_sys.h"
-
-#include "bta_ag_int.h"
-
-#if BTA_HS_INCLUDED == TRUE
-#include "bta_hs_int.h"
-#endif
-
-#include "bta_dm_int.h"
-
-#if BTA_AR_INCLUDED==TRUE
-#include "bta_ar_int.h"
-#endif
-#if BTA_AV_INCLUDED==TRUE
-#include "bta_av_int.h"
-#endif
-
-#if BTA_HH_INCLUDED==TRUE
-#include "bta_hh_int.h"
-#endif
-
-#if BTA_JV_INCLUDED==TRUE
-#include "bta_jv_int.h"
-tBTA_JV_CB *bta_jv_cb_ptr = NULL;
-#endif
-
-#if BTA_HL_INCLUDED == TRUE
-#include "bta_hl_int.h"
-#endif
-
-#if BTA_GATT_INCLUDED == TRUE
-#include "bta_gattc_int.h"
-#include "bta_gatts_int.h"
-#endif
-
-#if BTA_PAN_INCLUDED==TRUE
-#include "bta_pan_int.h"
-#endif
-
-#include "bta_sys_int.h"
-
-/* control block for patch ram downloading */
-#include "bta_prm_int.h"
-
-#endif /* BTA_INCLUDED */
-
 /*****************************************************************************
 **                          F U N C T I O N S                                *
 ******************************************************************************/
@@ -173,39 +124,4 @@ void BTE_InitStack(void)
     MCA_Init();
 #endif
 
-/****************
-** BTA Modules **
-*****************/
-#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));
-    memset((void*)bta_dm_search_cb_ptr, 0, sizeof(tBTA_DM_SEARCH_CB));
-    memset((void*)bta_dm_di_cb_ptr, 0, sizeof(tBTA_DM_DI_CB));
-    memset((void*)bta_prm_cb_ptr, 0, sizeof(tBTA_PRM_CB));
-    memset((void*)bta_ag_cb_ptr, 0, sizeof(tBTA_AG_CB));
-#if BTA_HS_INCLUDED == TRUE
-    memset((void*)bta_hs_cb_ptr, 0, sizeof(tBTA_HS_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_HH_INCLUDED==TRUE
-    memset((void *)bta_hh_cb_ptr, 0, sizeof(tBTA_HH_CB));
-#endif
-#if BTA_HL_INCLUDED==TRUE
-    memset((void *)bta_hl_cb_ptr, 0, sizeof(tBTA_HL_CB));
-#endif
-#if BTA_GATT_INCLUDED==TRUE
-    memset((void *)bta_gattc_cb_ptr, 0, sizeof(tBTA_GATTC_CB));
-    memset((void *)bta_gatts_cb_ptr, 0, sizeof(tBTA_GATTS_CB));
-#endif
-#if BTA_PAN_INCLUDED==TRUE
-    memset((void *)bta_pan_cb_ptr, 0, sizeof(tBTA_PAN_CB));
-#endif
-
-#endif /* BTA_INCLUDED == TRUE */
-
 }
index de599ed..2f1119b 100644 (file)
 #define LLCP_DYNAMIC_MEMORY  FALSE
 #endif
 
-/****************************************************************************
-** Define memory usage for BTA (if not defined in bdroid_buildcfg.h)
-**  The default for each component is to use static memory allocations.
-*/
-#ifndef BTA_DYNAMIC_MEMORY
-#define BTA_DYNAMIC_MEMORY FALSE
-#endif
-
 #endif  /* #ifdef DYN_MEM_H */