Lines Matching refs:bytes_done
41 ssize_t bytes_done; in bfin_otp_read() local
53 bytes_done = 0; in bfin_otp_read()
55 while (bytes_done < count) { in bfin_otp_read()
62 bytes_done = -EIO; in bfin_otp_read()
65 if (copy_to_user(buff + bytes_done, &content, sizeof(content))) { in bfin_otp_read()
66 bytes_done = -EFAULT; in bfin_otp_read()
71 bytes_done += sizeof(content); in bfin_otp_read()
77 return bytes_done; in bfin_otp_read()
122 ssize_t bytes_done; in bfin_otp_write() local
145 bytes_done = 0; in bfin_otp_write()
147 while (bytes_done < count) { in bfin_otp_write()
150 (flags & OTP_UPPER_HALF ? "upper" : "lower"), buff + bytes_done); in bfin_otp_write()
151 if (copy_from_user(&content, buff + bytes_done, sizeof(content))) { in bfin_otp_write()
152 bytes_done = -EFAULT; in bfin_otp_write()
158 bytes_done = -EIO; in bfin_otp_write()
163 bytes_done += sizeof(content); in bfin_otp_write()
171 return bytes_done; in bfin_otp_write()