staging: follow changes up for building Android logger driver
authorSeokYeon Hwang <syeon.hwang@samsung.com>
Thu, 9 Jun 2016 03:13:29 +0000 (12:13 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Thu, 9 Jun 2016 03:23:07 +0000 (12:23 +0900)
Follow changes up in commit 66ee59af630fd8d5f4f56fb28162857e629aa0ab.

Change-Id: I495139006939619bc35d7ec7ecc8967996317afb
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
drivers/staging/android/logger.c

index 59ea1a7db893d47cef3cbed687038c4155a1a706..e98c9e704eb362d293d849daf85b478fdc0cacdf 100644 (file)
@@ -29,6 +29,7 @@
 #include <linux/time.h>
 #include <linux/vmalloc.h>
 #include <linux/aio.h>
+#include <linux/uio.h>
 #include "logger.h"
 
 #include <asm/ioctls.h>
@@ -421,7 +422,8 @@ static ssize_t logger_write_iter(struct kiocb *iocb, struct iov_iter *from)
        struct timespec now;
        size_t len, count, w_off;
 
-       count = min_t(size_t, iocb->ki_nbytes, LOGGER_ENTRY_MAX_PAYLOAD);
+       //count = min_t(size_t, iocb->ki_nbytes, LOGGER_ENTRY_MAX_PAYLOAD);
+       count = min_t(size_t, iov_iter_count(from), LOGGER_ENTRY_MAX_PAYLOAD);
 
        now = current_kernel_time();