Skip to content

Commit

Permalink
arch: cxd56xx: Fix issue by update of inode reference
Browse files Browse the repository at this point in the history
Fix an issue of driver open failure caused by the following commit
that changes the initial value of inode reference.

43d0d95 fs/inode: using inode reference to indicate unlink and simply code
  • Loading branch information
SPRESENSE committed Sep 17, 2024
1 parent 92cbb63 commit 69124fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arch/arm/src/cxd56xx/cxd56_sph.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/src/cxd56xx/cxd56_uart0.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 69124fd

Please sign in to comment.