arch: cxd56xx: Fix issue by update of inode reference

Fix an issue of driver open failure caused by the following commit
that changes the initial value of inode reference.

43d0d95f81 fs/inode: using inode reference to indicate unlink and simply code
This commit is contained in:
SPRESENSE 2024-09-17 10:38:38 +09:00 committed by Xiang Xiao
parent a2c704a84a
commit 237087f61a
2 changed files with 3 additions and 3 deletions

View File

@ -104,7 +104,7 @@ static int sph_open(struct file *filep)
{
/* Exclusive access */
if (filep->f_inode->i_crefs > 1)
if (filep->f_inode->i_crefs > 2)
{
return ERROR;
}

View File

@ -115,7 +115,7 @@ static int uart0_open(struct file *filep)
int stop;
int ret;
if (inode->i_crefs > 1)
if (inode->i_crefs > 2)
{
return OK;
}
@ -172,7 +172,7 @@ static int uart0_close(struct file *filep)
{
struct inode *inode = filep->f_inode;
if (inode->i_crefs == 1)
if (inode->i_crefs == 2)
{
fw_pd_uartdisable(0);
fw_pd_uartuninit(0);