浏览代码

Merge remote-tracking branch 'spi/topic/msglen' into spi-next

Mark Brown 12 年之前
父节点
当前提交
9020b75467
共有 2 个文件被更改,包括 2 次插入0 次删除
  1. 1 0
      drivers/spi/spi.c
  2. 1 0
      include/linux/spi/spi.h

+ 1 - 0
drivers/spi/spi.c

@@ -1380,6 +1380,7 @@ static int __spi_async(struct spi_device *spi, struct spi_message *message)
 	 * it is not set for this transfer.
 	 * it is not set for this transfer.
 	 */
 	 */
 	list_for_each_entry(xfer, &message->transfers, transfer_list) {
 	list_for_each_entry(xfer, &message->transfers, transfer_list) {
+		message->frame_length += xfer->len;
 		if (!xfer->bits_per_word)
 		if (!xfer->bits_per_word)
 			xfer->bits_per_word = spi->bits_per_word;
 			xfer->bits_per_word = spi->bits_per_word;
 		if (!xfer->speed_hz) {
 		if (!xfer->speed_hz) {

+ 1 - 0
include/linux/spi/spi.h

@@ -584,6 +584,7 @@ struct spi_message {
 	/* completion is reported through a callback */
 	/* completion is reported through a callback */
 	void			(*complete)(void *context);
 	void			(*complete)(void *context);
 	void			*context;
 	void			*context;
+	unsigned		frame_length;
 	unsigned		actual_length;
 	unsigned		actual_length;
 	int			status;
 	int			status;