/* Resume channel program if the channel is suspended.  */
static int __lcs_resume_channel(struct lcs_channel *channel)
/* Resume channel program if the channel is suspended.  */
static int __lcs_resume_channel(struct lcs_channel *channel)
{
	int rc;
	if (channel->state != LCS_CH_STATE_SUSPENDED)
		return 0;
	if (channel->ccws[channel->io_idx].flags & CCW_FLAG_SUSPEND)
		return 0;
	LCS_DBF_TEXT_(5, trace, "rsch%s", dev_name(&channel->ccwdev->dev));
	rc = ccw_device_resume(channel->ccwdev);
	if (rc) {
		LCS_DBF_TEXT_(4, trace, "ersc%s",
			      dev_name(&channel->ccwdev->dev));
		dev_err(&channel->ccwdev->dev,
			"Sending data from the LCS device to the LAN failed"
			" with rc=%d\n",rc);
	} else
		channel->state = LCS_CH_STATE_RUNNING;
	return rc;
}