Before the re-implementation of serdev_device_write_buf() to use serdev_device_write() internally, this function returned the number of bytes written in case of success. serdev_device_write() instead returns 0 when the transmission was successful, which breaks users relying on the old API. Fixes: 6fe729c4bdae (serdev: Add serdev_device_write subroutine) Signed-off-by: Lucas Stach <l.stach@xxxxxxxxxxxxxx> --- include/linux/serdev.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/linux/serdev.h b/include/linux/serdev.h index cda76c6506ca..4ced8f177220 100644 --- a/include/linux/serdev.h +++ b/include/linux/serdev.h @@ -316,7 +316,10 @@ static inline int serdev_device_write_buf(struct serdev_device *serdev, const unsigned char *data, size_t count) { - return serdev_device_write(serdev, data, count, 0); + int ret; + + ret = serdev_device_write(serdev, data, count, 0); + return ret ? ret : count; } #endif /*_LINUX_SERDEV_H */ -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html