net/usrsock: Remove dev field from usrsockdev_s

since this field isn't really used at all

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-08-22 04:24:31 +08:00 committed by Petro Karashchenko
parent eb9cfefc1b
commit 697e2a333b
2 changed files with 1 additions and 10 deletions

View File

@ -94,7 +94,6 @@ struct usrsock_conn_s
int8_t type; /* Socket type (SOCK_STREAM, etc) */
int16_t usockid; /* Connection number used for kernel<->daemon */
uint16_t flags; /* Socket state flags */
struct usrsockdev_s *dev; /* Device node used for this conn */
struct
{

View File

@ -1134,17 +1134,9 @@ errout:
int usrsockdev_do_request(FAR struct usrsock_conn_s *conn,
FAR struct iovec *iov, unsigned int iovcnt)
{
FAR struct usrsockdev_s *dev = conn->dev;
FAR struct usrsockdev_s *dev = &g_usrsockdev;
FAR struct usrsock_request_common_s *req_head = iov[0].iov_base;
if (!dev)
{
/* Setup conn for new usrsock device. */
dev = &g_usrsockdev;
conn->dev = dev;
}
if (!usrsockdev_is_opened(dev))
{
ninfo("usockid=%d; daemon has closed /dev/usrsock.\n", conn->usockid);