summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-02-19 18:10:50 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2012-03-17 18:16:03 +0100
commitb55fbf7f5f14a8a60b4f5bdf1416c25fc4d3e59d (patch)
treec1347f0240f41d11fe1129bff61e3f080c6f1742 /include
parent4b4bfcc0bf02f4da89c3f24758c3b9b07e10c8d2 (diff)
downloadbarebox-b55fbf7f5f14a8a60b4f5bdf1416c25fc4d3e59d.tar.gz
barebox-b55fbf7f5f14a8a60b4f5bdf1416c25fc4d3e59d.tar.xz
fs: drop struct mtab_entry
every struct fs_device_d contains a struct mtab_entry, so they have a 1:1 relationship. Instead of having to use container_of to get from a struct mtab_entry to a struct fs_device_d we can better embed the members of struct mtab_entry into struct fs_device_d directly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/fs.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/include/fs.h b/include/fs.h
index e5364f9e79..7815da592c 100644
--- a/include/fs.h
+++ b/include/fs.h
@@ -77,15 +77,8 @@ struct fs_driver_d {
#define dev_to_fs_driver(d) container_of(d->driver, struct fs_driver_d, drv)
#define dev_to_fs_device(d) container_of(d, struct fs_device_d, dev)
-struct mtab_entry {
- char *path;
- struct device_d *dev;
- struct device_d *parent_device;
- struct list_head list;
-};
-
-extern struct list_head mtab_list;
-#define for_each_mtab_entry(e) list_for_each_entry(e, &mtab_list, list)
+extern struct list_head fs_device_list;
+#define for_each_fs_device(f) list_for_each_entry(f, &fs_device_list, list)
struct fs_device_d {
char *backingstore; /* the device we are associated with */
@@ -94,7 +87,9 @@ struct fs_device_d {
struct fs_driver_d *driver;
struct cdev *cdev;
- struct mtab_entry mtab;
+ char *path;
+ struct device_d *parent_device;
+ struct list_head list;
};
/*