diff options
author | David Anders <x0132446@ti.com> | 2010-10-07 15:36:29 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-10-08 14:06:34 -0400 |
commit | b9b52620823f84f95f3fd94dd6769b7102d7888a (patch) | |
tree | 6779d792f3e7195ee66dc31f94bf67dce50c721c /arch/arm/mach-omap2 | |
parent | 191183b94cc511d0fc2326c83165d95aeabacac4 (diff) |
omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set
Avoid possible crash if CONFIG_MMC_OMAP_HS is not set.
Signed-off-by: David Anders <x0132446@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/board-omap4panda.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index d8c70c13953a..e9c6b24361bc 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -116,7 +116,14 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev) | |||
116 | 116 | ||
117 | static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev) | 117 | static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev) |
118 | { | 118 | { |
119 | struct omap_mmc_platform_data *pdata = dev->platform_data; | 119 | struct omap_mmc_platform_data *pdata; |
120 | |||
121 | /* dev can be null if CONFIG_MMC_OMAP_HS is not set */ | ||
122 | if (!dev) { | ||
123 | pr_err("Failed omap4_twl6030_hsmmc_set_late_init\n"); | ||
124 | return; | ||
125 | } | ||
126 | pdata = dev->platform_data; | ||
120 | 127 | ||
121 | pdata->init = omap4_twl6030_hsmmc_late_init; | 128 | pdata->init = omap4_twl6030_hsmmc_late_init; |
122 | } | 129 | } |