/* Transfer a message to a specified SPI slave @s SPI slave @m message to transfer  */
static int spi_stm32_transfer(struct spi_device *s, struct spi_message *msg)
/* Transfer a message to a specified SPI slave @s SPI slave @m message to transfer  */
static int spi_stm32_transfer(struct spi_device *s, struct spi_message *msg)
{
	struct spi_stm32 *c = spi_master_get_devdata(s->master);
	unsigned long f;
	int ret = 0;
	if (c->stopping) {
		ret = -ESHUTDOWN;
		goto Done;
	}
	if (unlikely(list_empty(&msg->transfers))) {
		ret = -EINVAL;
		goto Done;
	}
	msg->status = -EINPROGRESS;
	msg->actual_length = 0;
	spin_lock_irqsave(&c->lock, f);
	list_add_tail(&msg->queue, &c->queue);
	queue_work(c->workqueue, &c->work);
	spin_unlock_irqrestore(&c->lock, f);
Done:
	d_printk(3, "msg=%p,ret=%d\n", msg, ret);
	return ret;
}