Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c09f7c7f authored by Jeff Hugo's avatar Jeff Hugo
Browse files

soc: qcom: smd: Make the data parameter to smd_write_segment() const



Some clients would like to pass const data buffers to smd_write_segment().
Change the function signature to permit this usecase.

Change-Id: I96a8012611d79ec9333576d5b5ba0f30657b184d
Signed-off-by: default avatarJeffrey Hugo <jhugo@codeaurora.org>
parent 408d933c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2121,7 +2121,8 @@ int smd_write_start(smd_channel_t *ch, int len)
}
EXPORT_SYMBOL(smd_write_start);

int smd_write_segment(smd_channel_t *ch, void *data, int len, int user_buf)
int smd_write_segment(smd_channel_t *ch, const void *data, int len,
		      int user_buf)
{
	int bytes_written;

+3 −2
Original line number Diff line number Diff line
@@ -180,7 +180,8 @@ int smd_write_start(smd_channel_t *ch, int len);
 *      -EINVAL - invalid length
 *      -ENOEXEC - transaction not started
 */
int smd_write_segment(smd_channel_t *ch, void *data, int len, int user_buf);
int smd_write_segment(smd_channel_t *ch, const void *data, int len,
		      int user_buf);

/* Completes a packet transaction.  Do not call from interrupt context.
 *
@@ -352,7 +353,7 @@ static inline int smd_write_start(smd_channel_t *ch, int len)
}

static inline int
smd_write_segment(smd_channel_t *ch, void *data, int len, int user_buf)
smd_write_segment(smd_channel_t *ch, const void *data, int len, int user_buf)
{
	return -ENODEV;
}