From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 2/4] block: rename file operation functions
Date: Fri, 31 May 2013 12:38:04 +0200 [thread overview]
Message-ID: <1369996686-15900-2-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1369996686-15900-1-git-send-email-s.hauer@pengutronix.de>
block_read and block_write collide with a to-be-introduced
global function, so rename the file operation functions.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
common/block.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/common/block.c b/common/block.c
index 120d659..2cf85ae 100644
--- a/common/block.c
+++ b/common/block.c
@@ -176,7 +176,7 @@ static void *block_get(struct block_device *blk, int block)
return outdata;
}
-static ssize_t block_read(struct cdev *cdev, void *buf, size_t count,
+static ssize_t block_op_read(struct cdev *cdev, void *buf, size_t count,
loff_t offset, unsigned long flags)
{
struct block_device *blk = cdev->priv;
@@ -253,7 +253,7 @@ static int block_put(struct block_device *blk, const void *buf, int block)
return 0;
}
-static ssize_t block_write(struct cdev *cdev, const void *buf, size_t count,
+static ssize_t block_op_write(struct cdev *cdev, const void *buf, size_t count,
loff_t offset, ulong flags)
{
struct block_device *blk = cdev->priv;
@@ -310,14 +310,14 @@ static ssize_t block_write(struct cdev *cdev, const void *buf, size_t count,
}
#endif
-static int block_close(struct cdev *cdev)
+static int block_op_close(struct cdev *cdev)
{
struct block_device *blk = cdev->priv;
return writebuffer_flush(blk);
}
-static int block_flush(struct cdev *cdev)
+static int block_op_flush(struct cdev *cdev)
{
struct block_device *blk = cdev->priv;
@@ -325,12 +325,12 @@ static int block_flush(struct cdev *cdev)
}
static struct file_operations block_ops = {
- .read = block_read,
+ .read = block_op_read,
#ifdef CONFIG_BLOCK_WRITE
- .write = block_write,
+ .write = block_op_write,
#endif
- .close = block_close,
- .flush = block_flush,
+ .close = block_op_close,
+ .flush = block_op_flush,
.lseek = dev_lseek_default,
};
--
1.8.2.rc2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2013-05-31 10:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-31 10:38 [PATCH 1/4] block: remove unused read_start and read_done ops Sascha Hauer
2013-05-31 10:38 ` Sascha Hauer [this message]
2013-05-31 10:38 ` [PATCH 3/4] block: implement block_read/block_write functions Sascha Hauer
2013-05-31 10:38 ` [PATCH 4/4] partition: DOS: Add parameter for the NT disk Signature Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1369996686-15900-2-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox