summaryrefslogtreecommitdiffstats
path: root/fs/devfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/devfs.c')
-rw-r--r--fs/devfs.c40
1 files changed, 19 insertions, 21 deletions
diff --git a/fs/devfs.c b/fs/devfs.c
index 49cd48f6d8..c8ddbbdab0 100644
--- a/fs/devfs.c
+++ b/fs/devfs.c
@@ -28,7 +28,6 @@
#include <linux/err.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/mtd-abi.h>
-#include <partition.h>
#include <block.h>
struct devfs_inode {
@@ -36,14 +35,15 @@ struct devfs_inode {
struct cdev *cdev;
};
-static int devfs_read(struct device_d *_dev, FILE *f, void *buf, size_t size)
+static int devfs_read(struct device *_dev, FILE *f, void *buf, size_t size)
{
struct cdev *cdev = f->priv;
return cdev_read(cdev, buf, size, f->pos, f->flags);
}
-static int devfs_write(struct device_d *_dev, FILE *f, const void *buf, size_t size)
+static int devfs_write(struct device *_dev, FILE *f, const void *buf,
+ size_t size)
{
struct cdev *cdev = f->priv;
@@ -53,14 +53,15 @@ static int devfs_write(struct device_d *_dev, FILE *f, const void *buf, size_t s
return cdev_write(cdev, buf, size, f->pos, f->flags);
}
-static int devfs_lseek(struct device_d *_dev, FILE *f, loff_t pos)
+static int devfs_lseek(struct device *_dev, FILE *f, loff_t pos)
{
struct cdev *cdev = f->priv;
return cdev_lseek(cdev, pos);
}
-static int devfs_erase(struct device_d *_dev, FILE *f, loff_t count, loff_t offset)
+static int devfs_erase(struct device *_dev, FILE *f, loff_t count,
+ loff_t offset)
{
struct cdev *cdev = f->priv;
@@ -73,14 +74,15 @@ static int devfs_erase(struct device_d *_dev, FILE *f, loff_t count, loff_t offs
return cdev_erase(cdev, count, offset);
}
-static int devfs_protect(struct device_d *dev, FILE *f, size_t count, loff_t offset, int prot)
+static int devfs_protect(struct device *dev, FILE *f, size_t count,
+ loff_t offset, int prot)
{
struct cdev *cdev = f->priv;
return cdev_protect(cdev, count, offset, prot);
}
-static int devfs_discard_range(struct device_d *dev, FILE *f, loff_t count,
+static int devfs_discard_range(struct device *dev, FILE *f, loff_t count,
loff_t offset)
{
struct cdev *cdev = f->priv;
@@ -88,14 +90,14 @@ static int devfs_discard_range(struct device_d *dev, FILE *f, loff_t count,
return cdev_discard_range(cdev, count, offset);
}
-static int devfs_memmap(struct device_d *_dev, FILE *f, void **map, int flags)
+static int devfs_memmap(struct device *_dev, FILE *f, void **map, int flags)
{
struct cdev *cdev = f->priv;
return cdev_memmap(cdev, map, flags);
}
-static int devfs_open(struct device_d *_dev, FILE *f, const char *filename)
+static int devfs_open(struct device *_dev, FILE *f, const char *filename)
{
struct inode *inode = f->f_inode;
struct devfs_inode *node = container_of(inode, struct devfs_inode, inode);
@@ -112,12 +114,10 @@ static int devfs_open(struct device_d *_dev, FILE *f, const char *filename)
return ret;
}
- cdev->open++;
-
return 0;
}
-static int devfs_close(struct device_d *_dev, FILE *f)
+static int devfs_close(struct device *_dev, FILE *f)
{
struct cdev *cdev = f->priv;
int ret;
@@ -128,26 +128,24 @@ static int devfs_close(struct device_d *_dev, FILE *f)
return ret;
}
- cdev->open--;
-
return 0;
}
-static int devfs_flush(struct device_d *_dev, FILE *f)
+static int devfs_flush(struct device *_dev, FILE *f)
{
struct cdev *cdev = f->priv;
return cdev_flush(cdev);
}
-static int devfs_ioctl(struct device_d *_dev, FILE *f, int request, void *buf)
+static int devfs_ioctl(struct device *_dev, FILE *f, int request, void *buf)
{
struct cdev *cdev = f->priv;
return cdev_ioctl(cdev, request, buf);
}
-static int devfs_truncate(struct device_d *dev, FILE *f, loff_t size)
+static int devfs_truncate(struct device *dev, FILE *f, loff_t size)
{
struct cdev *cdev = f->priv;
@@ -293,10 +291,10 @@ static const struct super_operations devfs_ops = {
.destroy_inode = devfs_destroy_inode,
};
-static int devfs_probe(struct device_d *dev)
+static int devfs_probe(struct device *dev)
{
struct inode *inode;
- struct fs_device_d *fsdev = dev_to_fs_device(dev);
+ struct fs_device *fsdev = dev_to_fs_device(dev);
struct super_block *sb = &fsdev->sb;
sb->s_op = &devfs_ops;
@@ -308,11 +306,11 @@ static int devfs_probe(struct device_d *dev)
return 0;
}
-static void devfs_delete(struct device_d *dev)
+static void devfs_delete(struct device *dev)
{
}
-static struct fs_driver_d devfs_driver = {
+static struct fs_driver devfs_driver = {
.read = devfs_read,
.write = devfs_write,
.lseek = devfs_lseek,