From: Joseph Lo Date: Fri, 17 Aug 2012 07:04:31 +0000 (+0800) Subject: mmc: tegra: convert to device tree support only X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b37f9d98f3d28ad98cc6c1894159312914f49190;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git mmc: tegra: convert to device tree support only When compiling a kernel that supports only Tegra30 and not Tegra20, the SDHCI driver will fail to compile since the of_match_device() failure fallback code unconditinally references soc_data_tegra20, which is only compiled in when Tegra20 support is enabled. In Kernel 3.7, both Tegra20 and Tegra30 will only support booting using device tree, Hence, there is never a need to fall back to using soc_data_tegra20 if of_mach_device() fails. Instead, make this case an error. This removes the reference to soc_data_tegra20, and hence solves the compile failure. Signed-off-by: Joseph Lo Tested-by: Stephen Warren Signed-off-by: Chris Ball --- diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index 0810ccc23d7e..436186ccbbe2 100644 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host/sdhci-tegra.c @@ -257,10 +257,9 @@ static int __devinit sdhci_tegra_probe(struct platform_device *pdev) int rc; match = of_match_device(sdhci_tegra_dt_match, &pdev->dev); - if (match) - soc_data = match->data; - else - soc_data = &soc_data_tegra20; + if (!match) + return -EINVAL; + soc_data = match->data; host = sdhci_pltfm_init(pdev, soc_data->pdata); if (IS_ERR(host))