checkpatch.pl: Request a test when a new command is added
[oweals/u-boot.git] / drivers / block / blk-uclass.c
index e8f58b3f5e471b815c619a0a091fab87d5e7d762..b19375cbc8da3466eef5e22a3d27952b2140500d 100644 (file)
@@ -7,9 +7,13 @@
 #include <common.h>
 #include <blk.h>
 #include <dm.h>
+#include <log.h>
+#include <malloc.h>
+#include <part.h>
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <dm/uclass-internal.h>
+#include <linux/err.h>
 
 static const char *if_typename_str[IF_TYPE_COUNT] = {
        [IF_TYPE_IDE]           = "ide",
@@ -580,6 +584,7 @@ int blk_create_device(struct udevice *parent, const char *drv_name,
        desc = dev_get_uclass_platdata(dev);
        desc->if_type = if_type;
        desc->blksz = blksz;
+       desc->log2blksz = LOG2(desc->blksz);
        desc->lba = lba;
        desc->part_type = PART_TYPE_UNKNOWN;
        desc->bdev = dev;