cxd56xx: rm sched_[un]lock

According to the current implementation, "cxd56_cpu1siguninit" will only
be called once during the NuttX startup phase,
and it won't involve scenarios of multi-threaded concurrent access.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
hujun5
2023-09-07 07:46:08 +08:00
committed by Xiang Xiao
parent 4b67e23049
commit 83ba72e4b4
-10
View File
@@ -169,8 +169,6 @@ int cxd56_cpu1siginit(uint8_t sigtype, void *data)
return -ENODEV;
}
sched_lock();
if (priv->sigtype[sigtype].use)
{
ret = -EBUSY;
@@ -188,8 +186,6 @@ int cxd56_cpu1siginit(uint8_t sigtype, void *data)
priv->ndev++;
sched_unlock();
cxd56_iccinit(CXD56_PROTO_GNSS);
ret = cxd56_iccinitmsg(CXD56CPU1_CPUID);
@@ -221,7 +217,6 @@ err0:
return ret;
err1:
sched_unlock();
return ret;
}
@@ -236,12 +231,9 @@ int cxd56_cpu1siguninit(uint8_t sigtype)
return -ENODEV;
}
sched_lock();
if (!priv->sigtype[sigtype].use)
{
ret = -EBUSY;
sched_unlock();
return ret;
}
@@ -258,8 +250,6 @@ int cxd56_cpu1siguninit(uint8_t sigtype)
pid = priv->workerpid;
priv->workerpid = INVALID_PROCESS_ID;
sched_unlock();
ret = kthread_delete(pid);
if (ret)