mmc: mmci: Fix compiler error when CONFIG_OF is not set
authorLee Jones <lee.jones@linaro.org>
Tue, 8 May 2012 12:59:38 +0000 (13:59 +0100)
committerChris Ball <cjb@laptop.org>
Tue, 8 May 2012 14:36:52 +0000 (10:36 -0400)
error: implicit declaration of function 'mmci_dt_populate_generic_pdata'

This is due to the '#if CONFIG_OF' guards placed around
mmci_dt_populate_generic_pdata(), but not around the call to it. We
repair this by inserting a stub which elegantly returns when CONFIG_OF
is not set.

Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/mmci.c

index 2303a16263ef6f759a283d9e7106ccef14781f9f..efc822df4b75fcdaabef43ada50db5c22c92b715 100644 (file)
@@ -1241,6 +1241,12 @@ static void mmci_dt_populate_generic_pdata(struct device_node *np,
                pr_warn("%s: Unsupported bus width\n", np->full_name);
        }
 }
+#else
+static void mmci_dt_populate_generic_pdata(struct device_node *np,
+                                       struct mmci_platform_data *pdata)
+{
+       return;
+}
 #endif
 
 static int __devinit mmci_probe(struct amba_device *dev,