diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-07-04 09:07:24 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-07-14 08:01:11 +0200 |
commit | 2d9d230089d0a5088bb3b37b01dfddc6527740a6 (patch) | |
tree | da90322653fc20a9de4b1ebf5650189ee2f20648 /common/block.c | |
parent | 2e82822d080950d9f2cc2bfadafd31ec9809b871 (diff) | |
download | barebox-2d9d230089d0a5088bb3b37b01dfddc6527740a6.tar.gz barebox-2d9d230089d0a5088bb3b37b01dfddc6527740a6.tar.xz |
block: Add flush callback
Some block devices need an explicit callback for flushing written
blocks. Add this callback.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/block.c')
-rw-r--r-- | common/block.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/block.c b/common/block.c index e522ee425a..0edc8619ef 100644 --- a/common/block.c +++ b/common/block.c @@ -55,6 +55,9 @@ static int writebuffer_flush(struct block_device *blk) } } + if (blk->ops->flush) + return blk->ops->flush(blk); + return 0; } |