diff --git a/lib/include/openamp/rpmsg.h b/lib/include/openamp/rpmsg.h index c5ed7da3b..e4f268d3a 100644 --- a/lib/include/openamp/rpmsg.h +++ b/lib/include/openamp/rpmsg.h @@ -110,6 +110,19 @@ struct rpmsg_device { bool support_ns; }; +/** + * is_rpmsg_ept_ready - check if the rpmsg endpoint ready to send + * + * @ept: pointer to rpmsg endpoint + * + * Returns 1 if the rpmsg endpoint has both local addr and destination + * addr set, 0 otherwise + */ +static inline unsigned int is_rpmsg_ept_ready(struct rpmsg_endpoint *ept) +{ + return ept && ept->rdev && ept->dest_addr != RPMSG_ADDR_ANY; +} + /** * rpmsg_send_offchannel_raw() - send a message across to the remote processor, * specifying source and destination address. @@ -332,19 +345,6 @@ int rpmsg_create_ept(struct rpmsg_endpoint *ept, struct rpmsg_device *rdev, */ void rpmsg_destroy_ept(struct rpmsg_endpoint *ept); -/** - * is_rpmsg_ept_ready - check if the rpmsg endpoint ready to send - * - * @ept: pointer to rpmsg endpoint - * - * Returns 1 if the rpmsg endpoint has both local addr and destination - * addr set, 0 otherwise - */ -static inline unsigned int is_rpmsg_ept_ready(struct rpmsg_endpoint *ept) -{ - return ept && ept->rdev && ept->dest_addr != RPMSG_ADDR_ANY; -} - #if defined __cplusplus } #endif