]> git.karo-electronics.de Git - karo-tx-uboot.git/commitdiff
dm: blk: conditionally disable functions that don't play well with CONFIG_DM_MMC
authorLothar Waßmann <LW@KARO-electronics.de>
Wed, 8 Mar 2017 14:50:47 +0000 (15:50 +0100)
committerLothar Waßmann <LW@KARO-electronics.de>
Mon, 13 Mar 2017 15:36:19 +0000 (16:36 +0100)
blk_{read|write}_devnum() don't work with CONFIG_DM_MMC enabled.
Prevent use under these circumstances by making the function
definition depend on !CONFIG_DM_MMC

drivers/block/blk-uclass.c

index 6ba1026f5818efc61f69182112a79fd60d75fa1a..06a06ec9460b233b50b351945d0557afedb36f42 100644 (file)
@@ -124,6 +124,7 @@ struct blk_desc *blk_get_devnum_by_typename(const char *if_typename, int devnum)
        return NULL;
 }
 
+#ifndef CONFIG_DM_MMC
 /**
  * get_desc() - Get the block device descriptor for the given device number
  *
@@ -164,6 +165,7 @@ static int get_desc(enum if_type if_type, int devnum, struct blk_desc **descp)
 
        return found_more ? -ENOENT : -ENODEV;
 }
+#endif
 
 int blk_select_hwpart_devnum(enum if_type if_type, int devnum, int hwpart)
 {
@@ -177,6 +179,7 @@ int blk_select_hwpart_devnum(enum if_type if_type, int devnum, int hwpart)
        return blk_select_hwpart(dev, hwpart);
 }
 
+#ifndef CONFIG_DM_MMC
 int blk_list_part(enum if_type if_type)
 {
        struct blk_desc *desc;
@@ -302,6 +305,7 @@ ulong blk_write_devnum(enum if_type if_type, int devnum, lbaint_t start,
                return ret;
        return blk_dwrite(desc, start, blkcnt, buffer);
 }
+#endif
 
 int blk_select_hwpart(struct udevice *dev, int hwpart)
 {