Skip to content

Commit 59a7821

Browse files
JianyuWang0623xiaoxiang781216
authored andcommitted
drivers/bch: Drivers may not support command BIOC_FLUSH
Calling `bchlib_flushsector()` maybe enough on some devices. Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
1 parent 5d3a2da commit 59a7821

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/bch/bchdev_driver.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,13 @@ static int bch_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
455455
if (bchinode->u.i_bops->ioctl != NULL)
456456
{
457457
ret = bchinode->u.i_bops->ioctl(bchinode, cmd, arg);
458+
459+
/* Drivers may not support command BIOC_FLUSH */
460+
461+
if (ret == -ENOTTY && cmd == BIOC_FLUSH)
462+
{
463+
ret = 0;
464+
}
458465
}
459466
}
460467
break;

0 commit comments

Comments
 (0)