mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
rpmsg: core: add API to get MTU
Return the rpmsg buffer MTU for sending message, so rpmsg users can split a long message in several sub rpmsg buffers. Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Acked-by: Suman Anna <s-anna@ti.com> Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com> Link: https://lore.kernel.org/r/20211015094701.5732-2-arnaud.pouliquen@foss.st.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
74365bc138
commit
e279317e9a
@@ -186,6 +186,8 @@ int rpmsg_trysend_offchannel(struct rpmsg_endpoint *ept, u32 src, u32 dst,
|
||||
__poll_t rpmsg_poll(struct rpmsg_endpoint *ept, struct file *filp,
|
||||
poll_table *wait);
|
||||
|
||||
ssize_t rpmsg_get_mtu(struct rpmsg_endpoint *ept);
|
||||
|
||||
#else
|
||||
|
||||
static inline int rpmsg_register_device(struct rpmsg_device *rpdev)
|
||||
@@ -296,6 +298,14 @@ static inline __poll_t rpmsg_poll(struct rpmsg_endpoint *ept,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline ssize_t rpmsg_get_mtu(struct rpmsg_endpoint *ept)
|
||||
{
|
||||
/* This shouldn't be possible */
|
||||
WARN_ON(1);
|
||||
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
#endif /* IS_ENABLED(CONFIG_RPMSG) */
|
||||
|
||||
/* use a macro to avoid include chaining to get THIS_MODULE */
|
||||
|
Reference in New Issue
Block a user