summaryrefslogtreecommitdiff
path: root/nuttx/drivers/bch
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-09-28 16:50:07 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-09-28 16:50:07 -0600
commit4c24c7c4a741eaeffc76339f07076cdad7a36c56 (patch)
tree337a94000f0e849884e81e8ac2ee188bf0a38179 /nuttx/drivers/bch
parente735773fe5ea269b43dbecb246cec846b3a0368e (diff)
downloadpx4-nuttx-4c24c7c4a741eaeffc76339f07076cdad7a36c56.tar.gz
px4-nuttx-4c24c7c4a741eaeffc76339f07076cdad7a36c56.tar.bz2
px4-nuttx-4c24c7c4a741eaeffc76339f07076cdad7a36c56.zip
Clean up some naming: fd vs. fildes vs. filedes and filep vs filp
Diffstat (limited to 'nuttx/drivers/bch')
-rw-r--r--nuttx/drivers/bch/bchdev_driver.c41
1 files changed, 22 insertions, 19 deletions
diff --git a/nuttx/drivers/bch/bchdev_driver.c b/nuttx/drivers/bch/bchdev_driver.c
index 262a0af46..597710d99 100644
--- a/nuttx/drivers/bch/bchdev_driver.c
+++ b/nuttx/drivers/bch/bchdev_driver.c
@@ -68,11 +68,14 @@
* Private Function Prototypes
****************************************************************************/
-static int bch_open(FAR struct file *filp);
-static int bch_close(FAR struct file *filp);
-static ssize_t bch_read(FAR struct file *, FAR char *, size_t);
-static ssize_t bch_write(FAR struct file *, FAR const char *, size_t);
-static int bch_ioctl(FAR struct file *filp, int cmd, unsigned long arg);
+static int bch_open(FAR struct file *filep);
+static int bch_close(FAR struct file *filep);
+static ssize_t bch_read(FAR struct file *filep, FAR char *buffer,
+ size_t buflen);
+static ssize_t bch_write(FAR struct file *filep, FAR const char *buffer,
+ size_t buflen);
+static int bch_ioctl(FAR struct file *filep, int cmd,
+ unsigned long arg);
/****************************************************************************
* Public Data
@@ -102,9 +105,9 @@ const struct file_operations bch_fops =
*
****************************************************************************/
-static int bch_open(FAR struct file *filp)
+static int bch_open(FAR struct file *filep)
{
- FAR struct inode *inode = filp->f_inode;
+ FAR struct inode *inode = filep->f_inode;
FAR struct bchlib_s *bch;
DEBUGASSERT(inode && inode->i_private);
@@ -133,9 +136,9 @@ static int bch_open(FAR struct file *filp)
*
****************************************************************************/
-static int bch_close(FAR struct file *filp)
+static int bch_close(FAR struct file *filep)
{
- FAR struct inode *inode = filp->f_inode;
+ FAR struct inode *inode = filep->f_inode;
FAR struct bchlib_s *bch;
int ret = OK;
@@ -168,9 +171,9 @@ static int bch_close(FAR struct file *filp)
* Name:bch_read
****************************************************************************/
-static ssize_t bch_read(FAR struct file *filp, FAR char *buffer, size_t len)
+static ssize_t bch_read(FAR struct file *filep, FAR char *buffer, size_t len)
{
- FAR struct inode *inode = filp->f_inode;
+ FAR struct inode *inode = filep->f_inode;
FAR struct bchlib_s *bch;
int ret;
@@ -178,10 +181,10 @@ static ssize_t bch_read(FAR struct file *filp, FAR char *buffer, size_t len)
bch = (FAR struct bchlib_s *)inode->i_private;
bchlib_semtake(bch);
- ret = bchlib_read(bch, buffer, filp->f_pos, len);
+ ret = bchlib_read(bch, buffer, filep->f_pos, len);
if (ret > 0)
{
- filp->f_pos += len;
+ filep->f_pos += len;
}
bchlib_semgive(bch);
return ret;
@@ -191,9 +194,9 @@ static ssize_t bch_read(FAR struct file *filp, FAR char *buffer, size_t len)
* Name:bch_write
****************************************************************************/
-static ssize_t bch_write(FAR struct file *filp, FAR const char *buffer, size_t len)
+static ssize_t bch_write(FAR struct file *filep, FAR const char *buffer, size_t len)
{
- FAR struct inode *inode = filp->f_inode;
+ FAR struct inode *inode = filep->f_inode;
FAR struct bchlib_s *bch;
int ret = -EACCES;
@@ -203,10 +206,10 @@ static ssize_t bch_write(FAR struct file *filp, FAR const char *buffer, size_t l
if (!bch->readonly)
{
bchlib_semtake(bch);
- ret = bchlib_write(bch, buffer, filp->f_pos, len);
+ ret = bchlib_write(bch, buffer, filep->f_pos, len);
if (ret > 0)
{
- filp->f_pos += len;
+ filep->f_pos += len;
}
bchlib_semgive(bch);
}
@@ -221,9 +224,9 @@ static ssize_t bch_write(FAR struct file *filp, FAR const char *buffer, size_t l
*
****************************************************************************/
-static int bch_ioctl(FAR struct file *filp, int cmd, unsigned long arg)
+static int bch_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
{
- FAR struct inode *inode = filp->f_inode;
+ FAR struct inode *inode = filep->f_inode;
FAR struct bchlib_s *bch;
int ret = -ENOTTY;