diff options
author | Joseph Lo <josephl@nvidia.com> | 2012-08-17 03:04:31 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2012-09-04 13:58:26 -0400 |
commit | b37f9d98f3d28ad98cc6c1894159312914f49190 (patch) | |
tree | 8df94dbb01014f3ae0f8e74a0909861df541b1b8 | |
parent | abe1e05da365350ac282ba5f6831aae13d97074e (diff) |
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 <josephl@nvidia.com>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
-rw-r--r-- | drivers/mmc/host/sdhci-tegra.c | 7 |
1 files changed, 3 insertions, 4 deletions
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) | |||
257 | int rc; | 257 | int rc; |
258 | 258 | ||
259 | match = of_match_device(sdhci_tegra_dt_match, &pdev->dev); | 259 | match = of_match_device(sdhci_tegra_dt_match, &pdev->dev); |
260 | if (match) | 260 | if (!match) |
261 | soc_data = match->data; | 261 | return -EINVAL; |
262 | else | 262 | soc_data = match->data; |
263 | soc_data = &soc_data_tegra20; | ||
264 | 263 | ||
265 | host = sdhci_pltfm_init(pdev, soc_data->pdata); | 264 | host = sdhci_pltfm_init(pdev, soc_data->pdata); |
266 | if (IS_ERR(host)) | 265 | if (IS_ERR(host)) |