mmc: tegra: convert to device tree support only
Subsystems (3)
PATCH 1/1 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.
--- drivers/mmc/host/sdhci-tegra.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-)
drivers/mmc/host/sdhci-tegra.c +3 -4
@@ -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))
Signature · 1 line
1.7.0.4
PATCH 1/1 mmc: tegra: convert to device tree support only
Quoted 10 lines · Joseph Lo
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 referencessoc_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_tegra20ifof_mach_device()fails. Instead, make this case an error. This removes the reference tosoc_data_tegra20, and hence solves the compile failure.
(built and tested both Tegra20-only and Tegr30-only kernels with this applied on top of next-20120816).
PATCH 1/1 mmc: tegra: convert to device tree support only
Quoted 12 lines · Stephen Warren
Quoted 10 lines · Joseph Lo
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 referencessoc_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_tegra20ifof_mach_device()fails. Instead, make this case an error. This removes the reference tosoc_data_tegra20, and hence solves the compile failure.
Quoted 4 lines
Tested-by Stephen Warren <[email protected]>(built and tested both Tegra20-only and Tegr30-only kernels with this applied on top of next-20120816).
Ping.
Could anyone help to review this?
Thanks.
PATCH 1/1 mmc: tegra: convert to device tree support only
Hi,
Quoted 13 lines · Joseph Lo
Quoted 12 lines · Stephen Warren
Quoted 10 lines · Joseph Lo
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 referencessoc_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_tegra20ifof_mach_device()fails. Instead, make this case an error. This removes the reference tosoc_data_tegra20, and hence solves the compile failure.
Quoted 6 lines
Quoted 4 lines
Tested-by Stephen Warren <[email protected]>(built and tested both Tegra20-only and Tegr30-only kernels with this applied on top of next-20120816).
Ping.
Thanks, pushed to mmc-next for 3.7.
- Chris.
Signature · 2 lines
Chris Ball <[email protected]> <http://printf.net/> One Laptop Per Child