[PATCH 4/6] fs: Make use of cdev_flush()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Drop extra checks and explicit indirect call in devfs_flush() in
favour of using cdev_flush(), since it already does all of the above.

Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx>
---
 fs/devfs.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/fs/devfs.c b/fs/devfs.c
index ce04d0243..d088c1a66 100644
--- a/fs/devfs.c
+++ b/fs/devfs.c
@@ -152,10 +152,7 @@ static int devfs_flush(struct device_d *_dev, FILE *f)
 {
 	struct cdev *cdev = f->priv;
 
-	if (cdev->ops->flush)
-		return cdev->ops->flush(cdev);
-
-	return 0;
+	return cdev_flush(cdev);
 }
 
 static int devfs_ioctl(struct device_d *_dev, FILE *f, int request, void *buf)
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux