You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/08/02 17:23:00 UTC
[incubator-nuttx] 03/07: rptun: unify name
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 886e10ba3c19b164a65cc9f910ad34578113ef20
Author: ligd <li...@xiaomi.com>
AuthorDate: Sat Apr 30 13:29:42 2022 +0800
rptun: unify name
Signed-off-by: ligd <li...@xiaomi.com>
---
drivers/rptun/rptun.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/rptun/rptun.c b/drivers/rptun/rptun.c
index 20a987f4de..74c905b6c1 100644
--- a/drivers/rptun/rptun.c
+++ b/drivers/rptun/rptun.c
@@ -65,8 +65,8 @@ struct rptun_priv_s
FAR struct rptun_dev_s *dev;
struct remoteproc rproc;
struct rpmsg_virtio_device rvdev;
- struct rpmsg_virtio_shm_pool tx_shpool;
- struct rpmsg_virtio_shm_pool rx_shpool;
+ struct rpmsg_virtio_shm_pool pooltx;
+ struct rpmsg_virtio_shm_pool poolrx;
struct metal_list bind;
rmutex_t lock;
struct metal_list node;
@@ -127,7 +127,7 @@ rptun_get_mem(FAR struct remoteproc *rproc,
metal_phys_addr_t da,
FAR void *va, size_t size,
FAR struct remoteproc_mem *buf);
-static int rptun_wait_tx_buffer(FAR struct remoteproc *rproc);
+static int rptun_wait_tx(FAR struct remoteproc *rproc);
static void rptun_ns_bind(FAR struct rpmsg_device *rdev,
FAR const char *name, uint32_t dest);
@@ -166,7 +166,7 @@ static const struct remoteproc_ops g_rptun_ops =
.stop = rptun_stop,
.notify = rptun_notify,
.get_mem = rptun_get_mem,
- .wait_tx_buffer = rptun_wait_tx_buffer,
+ .wait_tx_buffer = rptun_wait_tx,
};
static const struct file_operations g_rptun_devops =
@@ -427,7 +427,7 @@ rptun_get_mem(FAR struct remoteproc *rproc,
return buf;
}
-static int rptun_wait_tx_buffer(FAR struct remoteproc *rproc)
+static int rptun_wait_tx(FAR struct remoteproc *rproc)
{
FAR struct rptun_priv_s *priv = rproc->priv;
@@ -640,7 +640,7 @@ static int rptun_dev_start(FAR struct remoteproc *rproc)
shbufsz = rsc->config.txbuf_size * rsc->rpmsg_vring0.num +
rsc->config.rxbuf_size * rsc->rpmsg_vring1.num;
- rpmsg_virtio_init_shm_pool(&priv->tx_shpool, shbuf, shbufsz);
+ rpmsg_virtio_init_shm_pool(&priv->pooltx, shbuf, shbufsz);
}
else
{
@@ -648,13 +648,13 @@ static int rptun_dev_start(FAR struct remoteproc *rproc)
shbuf = (FAR char *)remoteproc_mmap(rproc, NULL, &da0,
v0sz, 0, NULL) + v0sz;
shbufsz = rsc->config.rxbuf_size * rsc->rpmsg_vring0.num;
- rpmsg_virtio_init_shm_pool(&priv->rx_shpool, shbuf, shbufsz);
+ rpmsg_virtio_init_shm_pool(&priv->poolrx, shbuf, shbufsz);
da1 = rsc->rpmsg_vring1.da;
shbuf = (FAR char *)remoteproc_mmap(rproc, NULL, &da1,
v1sz, 0, NULL) + v1sz;
shbufsz = rsc->config.txbuf_size * rsc->rpmsg_vring1.num;
- rpmsg_virtio_init_shm_pool(&priv->tx_shpool, shbuf, shbufsz);
+ rpmsg_virtio_init_shm_pool(&priv->pooltx, shbuf, shbufsz);
}
role = RPMSG_MASTER;
@@ -668,16 +668,16 @@ static int rptun_dev_start(FAR struct remoteproc *rproc)
return -ENOMEM;
}
- if (priv->rx_shpool.base)
+ if (priv->poolrx.base)
{
ret = rpmsg_init_vdev_ext(&priv->rvdev, vdev, rptun_ns_bind,
metal_io_get_region(),
- &priv->tx_shpool, &priv->rx_shpool);
+ &priv->pooltx, &priv->poolrx);
}
else
{
ret = rpmsg_init_vdev(&priv->rvdev, vdev, rptun_ns_bind,
- metal_io_get_region(), &priv->tx_shpool);
+ metal_io_get_region(), &priv->pooltx);
}
if (ret)