/* Returns: pointer to a struct cmd_ctrl_node or NULL if none available.  */
static struct cmd_ctrl_node * lbtf_get_cmd_ctrl_node(struct lbtf_private *priv)
/* Returns: pointer to a struct cmd_ctrl_node or NULL if none available.  */
static struct cmd_ctrl_node * lbtf_get_cmd_ctrl_node(struct lbtf_private *priv)
{
	struct cmd_ctrl_node *tempnode;
	unsigned long flags;
	if (!priv)
		return NULL;
	spin_lock_irqsave(&priv->driver_lock, flags);
	if (!list_empty(&priv->cmdfreeq)) {
		tempnode = list_first_entry(&priv->cmdfreeq,
					    struct cmd_ctrl_node, list);
		list_del(&tempnode->list);
	} else
		tempnode = NULL;
	spin_unlock_irqrestore(&priv->driver_lock, flags);
	return tempnode;
}