software/drivers/sd8887/src/bluetooth/bt/bt_proc.c
/**
 *  @brief This function removes proc interface
 *
 *  @param priv    A pointer to bt_private structure
 *  @return	N/A
 */
@brief This function removes proc interface
@param priv    A pointer to bt_private structure
@return     N/A
@brief This function removes proc interface @param priv A pointer to bt_private structure @return N / A
void
bt_proc_remove(bt_private *priv)
{
	int j, i;
	char hist_entry[50];
	ENTER();
	PRINTM(INFO, "BT: Remove Proc Interface\n");
	if (proc_mbt) {
		for (i = 0; i < MAX_RADIO_FUNC; i++) {
			if (!priv->dev_proc[i].proc_entry)
				continue;
			for (j = 0; j < ARRAY_SIZE(proc_files); j++) {
				remove_proc_entry(proc_files[j].name,
						  priv->dev_proc[i].proc_entry);
			}
			for (j = 0; j < MAX_ANTENNA_NUM; j++) {
				snprintf(hist_entry, sizeof(hist_entry),
					 "bt-ant%d", j);
				remove_proc_entry(hist_entry,
						  priv->dev_proc[i].hist_entry);
			}
			remove_proc_entry("histogram",
					  priv->dev_proc[i].proc_entry);
			remove_proc_entry(priv->bt_dev.m_dev[i].name, proc_mbt);
			priv->dev_proc[i].proc_entry = NULL;
			if (priv->dev_proc[i].pfiles) {
				for (j = 0;
				     j < priv->dev_proc[i].num_proc_files;
				     j++) {
					if (priv->dev_proc[i].pfiles[j].pdata) {
						kfree(priv->dev_proc[i].
						      pfiles[j].pdata);
						priv->dev_proc[i].pfiles[j].
							pdata = NULL;
					}
				}
				kfree(priv->dev_proc[i].pfiles);
				priv->dev_proc[i].pfiles = NULL;
			}
		}
	}
	LEAVE();
	return;
}
void bt_proc_remove ( bt_private * priv ) { int j , i ; char hist_entry [ 50 ] ; ENTER ( ) ; PRINTM ( INFO , " \n " ) ; if ( proc_mbt ) { for ( i = 0 ; i < MAX_RADIO_FUNC ; i ++ ) { if ( ! priv -> dev_proc [ i ] . proc_entry ) continue ; for ( j = 0 ; j < ARRAY_SIZE ( proc_files ) ; j ++ ) { remove_proc_entry ( proc_files [ j ] . name , priv -> dev_proc [ i ] . proc_entry ) ; } for ( j = 0 ; j < MAX_ANTENNA_NUM ; j ++ ) { snprintf ( hist_entry , sizeof ( hist_entry ) , " " , j ) ; remove_proc_entry ( hist_entry , priv -> dev_proc [ i ] . hist_entry ) ; } remove_proc_entry ( " " , priv -> dev_proc [ i ] . proc_entry ) ; remove_proc_entry ( priv -> bt_dev . m_dev [ i ] . name , proc_mbt ) ; priv -> dev_proc [ i ] . proc_entry = NULL ; if ( priv -> dev_proc [ i ] . pfiles ) { for ( j = 0 ; j < priv -> dev_proc [ i ] . num_proc_files ; j ++ ) { if ( priv -> dev_proc [ i ] . pfiles [ j ] . pdata ) { kfree ( priv -> dev_proc [ i ] . pfiles [ j ] . pdata ) ; priv -> dev_proc [ i ] . pfiles [ j ] . pdata = NULL ; } } kfree ( priv -> dev_proc [ i ] . pfiles ) ; priv -> dev_proc [ i ] . pfiles = NULL ; } } } LEAVE ( ) ; return ; }
@brief This function removes proc interface
  @param priv    A pointer to bt_private structure
  @return     N/A
@brief This function removes proc interface @param priv A pointer to bt_private structure @return N / A