Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7864339 authored by Chris Manton's avatar Chris Manton
Browse files

Remove useless global level of indirection

Towards encapsulated code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run

Change-Id: I49b167a33a7733d5abf3a290a45f63e801b7401d
parent 96e9e04a
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -397,7 +397,6 @@ struct sACL_CB {
  friend void btm_acl_device_down(void);
  friend void btm_acl_encrypt_change(uint16_t handle, uint8_t status,
                                     uint8_t encr_enable);
  friend void btm_acl_init(void);
  friend void btm_pm_proc_cmd_status(tHCI_STATUS status);
  friend void btm_pm_proc_mode_change(tHCI_STATUS hci_status,
                                      uint16_t hci_handle, tHCI_MODE mode,
+0 −11
Original line number Diff line number Diff line
@@ -209,17 +209,6 @@ void hci_btm_set_link_supervision_timeout(tACL_CONN& link, uint16_t timeout) {
/* 3 seconds timeout waiting for responses */
#define BTM_DEV_REPLY_TIMEOUT_MS (3 * 1000)

/*******************************************************************************
 *
 * Function         btm_acl_init
 *
 * Description      This function is called at BTM startup to initialize
 *
 * Returns          void
 *
 ******************************************************************************/
void btm_acl_init(void) { btm_cb.acl_cb_.Init(); }

void BTM_acl_after_controller_started(const controller_t* controller) {
  internal_.btm_set_default_link_policy(
      HCI_ENABLE_CENTRAL_PERIPHERAL_SWITCH | HCI_ENABLE_HOLD_MODE |
+0 −1
Original line number Diff line number Diff line
@@ -71,7 +71,6 @@ extern bool btm_inq_find_bdaddr(const RawAddress& p_bda);
/* Internal functions provided by btm_acl.cc
 *******************************************
*/
extern void btm_acl_init(void);
extern void btm_acl_device_down(void);
extern void btm_acl_set_paging(bool value);
extern void btm_acl_update_inquiry_status(uint8_t state);
+1 −2
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@
*/
tBTM_CB btm_cb;

extern void btm_acl_init(void);
extern void btm_dev_init(void);
extern void btm_dev_free(void);
extern void btm_inq_db_init(void);
@@ -62,7 +61,7 @@ void btm_init(void) {

  /* Initialize BTM component structures */
  btm_inq_db_init(); /* Inquiry Database and Structures */
  btm_acl_init();    /* ACL Database and Structures */
  btm_cb.acl_cb_.Init(); /* ACL Database and Structures */
  btm_sco_init(); /* SCO Database and Structures (If included) */

  btm_dev_init(); /* Device Manager Structures & HCI_Reset */