common: add blkcache init
[oweals/u-boot.git] / drivers / block / blkcache.c
index 1fa64989d3f2fcc5c9e0b3e6991f72b1fc5d96d5..f603aa129d4699351c243c2aa38d9aae80bbda58 100644 (file)
@@ -21,13 +21,20 @@ struct block_cache_node {
        char *cache;
 };
 
-static LIST_HEAD(block_cache);
+static struct list_head block_cache;
 
 static struct block_cache_stats _stats = {
        .max_blocks_per_entry = 8,
        .max_entries = 32
 };
 
+int blkcache_init(void)
+{
+       INIT_LIST_HEAD(&block_cache);
+
+       return 0;
+}
+
 static struct block_cache_node *cache_find(int iftype, int devnum,
                                           lbaint_t start, lbaint_t blkcnt,
                                           unsigned long blksz)