software/drivers/sd8887/src/bluetooth/bt/bt_main.c
/**
 *  @brief This function closes the bluetooth device
 *
 *  @param hdev    A pointer to hci_dev structure
 *
 *  @return    BT_STATUS_SUCCESS
 */
@brief This function closes the bluetooth device
@param hdev    A pointer to hci_dev structure


@brief This function closes the bluetooth device @param hdev A pointer to hci_dev structure
static int
bt_close(struct hci_dev *hdev)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0)
	bt_private *priv = (bt_private *)hci_get_drvdata(hdev);
#else
	bt_private *priv = (bt_private *)hdev->driver_data;
#endif
	ENTER();
#if LINUX_VERSION_CODE <= KERNEL_VERSION(4, 3, 0)
	if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags)) {
		LEAVE();
		return BT_STATUS_SUCCESS;
	}
#endif
	skb_queue_purge(&priv->adapter->tx_queue);
	module_put(THIS_MODULE);
	LEAVE();
	return BT_STATUS_SUCCESS;
}
static int bt_close ( struct hci_dev * hdev ) { #if LINUX_VERSION_CODE >= KERNEL_VERSION ( 3 , 4 , 0 ) bt_private * priv = ( bt_private * ) hci_get_drvdata ( hdev ) ; #else bt_private * priv = ( bt_private * ) hdev -> driver_data ; #endif ENTER ( ) ; #if LINUX_VERSION_CODE <= KERNEL_VERSION ( 4 , 3 , 0 ) if ( ! test_and_clear_bit ( HCI_RUNNING , & hdev -> flags ) ) { LEAVE ( ) ; return BT_STATUS_SUCCESS ; } #endif skb_queue_purge ( & priv -> adapter -> tx_queue ) ; module_put ( THIS_MODULE ) ; LEAVE ( ) ; return BT_STATUS_SUCCESS ; }
@brief This function closes the bluetooth device
  @param hdev    A pointer to hci_dev structure
@brief This function closes the bluetooth device @param hdev A pointer to hci_dev structure