aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rpmsg/qcom_glink_rpm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rpmsg/qcom_glink_rpm.c')
-rw-r--r--drivers/rpmsg/qcom_glink_rpm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/rpmsg/qcom_glink_rpm.c b/drivers/rpmsg/qcom_glink_rpm.c
index 5a86e089a977..69b25d157d0f 100644
--- a/drivers/rpmsg/qcom_glink_rpm.c
+++ b/drivers/rpmsg/qcom_glink_rpm.c
@@ -77,13 +77,16 @@ static size_t glink_rpm_rx_avail(struct qcom_glink_pipe *glink_pipe)
}
static void glink_rpm_rx_peak(struct qcom_glink_pipe *glink_pipe,
- void *data, size_t count)
+ void *data, unsigned int offset, size_t count)
{
struct glink_rpm_pipe *pipe = to_rpm_pipe(glink_pipe);
unsigned int tail;
size_t len;
tail = readl(pipe->tail);
+ tail += offset;
+ if (tail >= pipe->native.length)
+ tail -= pipe->native.length;
len = min_t(size_t, count, pipe->native.length - tail);
if (len) {

Privacy Policy