@@ -163,17 +163,16 @@ static ssize_t auxdev_read_iter(struct kiocb *iocb, struct iov_iter *to)
break;
}
- res = drm_dp_dpcd_read(aux_dev->aux, pos, buf, todo);
-
+ res = drm_dp_dpcd_read_data(aux_dev->aux, pos, buf, todo);
if (res <= 0)
break;
- if (copy_to_iter(buf, res, to) != res) {
+ if (copy_to_iter(buf, todo, to) != todo) {
res = -EFAULT;
break;
}
- pos += res;
+ pos += todo;
}
if (pos != iocb->ki_pos)
@@ -211,12 +210,11 @@ static ssize_t auxdev_write_iter(struct kiocb *iocb, struct iov_iter *from)
break;
}
- res = drm_dp_dpcd_write(aux_dev->aux, pos, buf, todo);
-
+ res = drm_dp_dpcd_write_data(aux_dev->aux, pos, buf, todo);
if (res <= 0)
break;
- pos += res;
+ pos += todo;
}
if (pos != iocb->ki_pos)
Switch drm_dp_aux_dev.c to use new set of DPCD read / write helpers. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> --- drivers/gpu/drm/display/drm_dp_aux_dev.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)