mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 06:39:01 +08:00
rpmsgdev: destroy distinguish active and passive
rpmsgdev server will not destroy if client reboot Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
This commit is contained in:
@@ -68,7 +68,6 @@ struct rpmsgdev_server_s
|
||||
* operation
|
||||
*/
|
||||
struct work_s work; /* Poll notify work */
|
||||
FAR void *priv;
|
||||
};
|
||||
|
||||
struct rpmsgdev_export_s
|
||||
@@ -458,12 +457,6 @@ static void rpmsgdev_ept_release(FAR struct rpmsg_endpoint *ept)
|
||||
|
||||
nxmutex_unlock(&server->lock);
|
||||
|
||||
if (server->priv)
|
||||
{
|
||||
kmm_free(server->priv);
|
||||
server->priv = NULL;
|
||||
}
|
||||
|
||||
kmm_free(server);
|
||||
}
|
||||
|
||||
@@ -486,7 +479,6 @@ static void rpmsgdev_ns_bind(FAR struct rpmsg_device *rdev,
|
||||
|
||||
list_initialize(&server->head);
|
||||
nxmutex_init(&server->lock);
|
||||
server->priv = priv;
|
||||
server->ept.priv = server;
|
||||
server->ept.release_cb = rpmsgdev_ept_release;
|
||||
|
||||
@@ -530,12 +522,6 @@ static void rpmsgdev_server_created(FAR struct rpmsg_device *rdev,
|
||||
snprintf(buf, sizeof(buf), "%s%s", RPMSGDEV_NAME_PREFIX,
|
||||
priv->localpath);
|
||||
rpmsgdev_ns_bind(rdev, priv, buf, RPMSG_ADDR_ANY);
|
||||
|
||||
rpmsg_unregister_callback(priv,
|
||||
rpmsgdev_server_created,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user