dm: mmc: Fix up mmc_bread/bwrite() prototypes for SPL
authorSimon Glass <sjg@chromium.org>
Sat, 14 May 2016 20:03:09 +0000 (14:03 -0600)
committerSimon Glass <sjg@chromium.org>
Fri, 27 May 2016 16:23:10 +0000 (10:23 -0600)
When these functions are not compiled in, we still need to declare the
correct function signature to avoid a build warnings in SPL. Fix this.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/mmc/mmc_private.h

index 27b9e5f56f8c284d489e817d9a7e33fc5dc3f8b2..9f0d5c2384a8a8a06c3e388e75ff3c9b3386c55b 100644 (file)
@@ -37,6 +37,19 @@ ulong mmc_bwrite(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt,
 
 /* SPL will never write or erase, declare dummies to reduce code size. */
 
+#ifdef CONFIG_BLK
+static inline unsigned long mmc_berase(struct udevice *dev,
+                                      lbaint_t start, lbaint_t blkcnt)
+{
+       return 0;
+}
+
+static inline ulong mmc_bwrite(struct udevice *dev, lbaint_t start,
+                              lbaint_t blkcnt, const void *src)
+{
+       return 0;
+}
+#else
 static inline unsigned long mmc_berase(struct blk_desc *block_dev,
                                       lbaint_t start, lbaint_t blkcnt)
 {
@@ -48,6 +61,7 @@ static inline ulong mmc_bwrite(struct blk_desc *block_dev, lbaint_t start,
 {
        return 0;
 }
+#endif
 
 #endif /* CONFIG_SPL_BUILD */