/* @cmd: command to be used as cancelling command @type: HCAM type @cmd_done: op done function for the cancelling command  */
static void pmcraid_cancel_hcam(struct pmcraid_cmd *cmd, u8 type, void(*cmd_done)(struct pmcraid_cmd *))
/* @cmd: command to be used as cancelling command @type: HCAM type @cmd_done: op done function for the cancelling command  */
static void pmcraid_cancel_hcam(struct pmcraid_cmd *cmd, u8 type, void(*cmd_done)(struct pmcraid_cmd *))
{
	struct pmcraid_instance *pinstance;
	struct pmcraid_hostrcb  *hcam;
	pinstance = cmd->drv_inst;
	hcam =  (type == PMCRAID_HCAM_CODE_LOG_DATA) ?
		&pinstance->ldn : &pinstance->ccn;
	if (hcam->cmd == NULL)
		return;
	pmcraid_prepare_cancel_cmd(cmd, hcam->cmd);
	pmcraid_send_cmd(cmd, cmd_done,
			 PMCRAID_INTERNAL_TIMEOUT,
			 pmcraid_timeout_handler);
}