diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-09-27 16:32:55 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-09-30 10:18:39 +0200 |
commit | 4dda27ce490e13901e59f108db980052afefc4fb (patch) | |
tree | 1c1853e9b4c023ffb4fbdb805ad2a11b50c8d2fe /include | |
parent | 7a1c5027f998f20ee6b3a681903f64105a4e8014 (diff) | |
download | barebox-4dda27ce490e13901e59f108db980052afefc4fb.tar.gz barebox-4dda27ce490e13901e59f108db980052afefc4fb.tar.xz |
block: Collect block devices on list
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/block.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/block.h b/include/block.h index eb31aca4db..872a4c1bba 100644 --- a/include/block.h +++ b/include/block.h @@ -2,6 +2,7 @@ #define __BLOCK_H #include <driver.h> +#include <linux/list.h> struct block_device; @@ -14,6 +15,7 @@ struct chunk; struct block_device { struct device_d *dev; + struct list_head list; struct block_device_ops *ops; int blockbits; int num_blocks; @@ -26,6 +28,10 @@ struct block_device { struct cdev cdev; }; +extern struct list_head block_device_list; + +#define for_each_block_device(bdev) list_for_each_entry(bdev, &block_device_list, list) + int blockdevice_register(struct block_device *blk); int blockdevice_unregister(struct block_device *blk); |