Exemplo n.º 1
0
static void delete_adapter_obj(struct hpi_adapter_obj *pao)
{
	struct hpi_hw_obj *phw = pao->priv;

	if (pao->has_control_cache)
		hpi_free_control_cache(phw->p_cache);

	/* reset DSPs on adapter */
	iowrite32(0x0003000F, phw->dw2040_HPICSR + HPI_RESET);

	kfree(phw);
}
Exemplo n.º 2
0
static void subsys_delete_adapter(struct hpi_message *phm,
	struct hpi_response *phr)
{
	struct hpi_adapter_obj *pao = NULL;
	struct hpi_hw_obj *phw;

	pao = hpi_find_adapter(phm->adapter_index);
	if (!pao)
		return;

	phw = (struct hpi_hw_obj *)pao->priv;

	if (pao->has_control_cache)
		hpi_free_control_cache(phw->p_cache);

	hpi_delete_adapter(pao);
	kfree(phw);

	phr->error = 0;
}