diff options
author | Balaji T K <balajitk@ti.com> | 2012-04-25 07:57:46 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2012-05-08 20:16:24 -0400 |
commit | 1ee47b0ae83e3cae2f9362113b3935898fdb3ea9 (patch) | |
tree | 3ef26910e99261d1f9fbf25b0926fcf708bd3372 /arch/arm/mach-omap2/common.h | |
parent | e54bdc187efcc029dd723128fe1fc518f7387d53 (diff) |
ARM: OMAP4: hsmmc: check for null pointer
platform_device pdev can be NULL if CONFIG_MMC_OMAP_HS is not set.
Add check for NULL pointer. while at it move the duplicated functions
to omap4-common.c
Fixes the following boot crash seen with omap4sdp and omap4panda
when MMC is disabled.
Unable to handle kernel NULL pointer dereference at virtual address 0000008c
pgd = c0004000
[0000008c] *pgd=00000000
Internal error: Oops: 5 [#1] SMP ARM
Modules linked in:
CPU: 0 Not tainted (3.4.0-rc1-05971-ga4dfa82 #4)
PC is at omap_4430sdp_init+0x184/0x410
LR is at device_add+0x1a0/0x664
Signed-off-by: Balaji T K <balajitk@ti.com>
Reported-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/common.h')
-rw-r--r-- | arch/arm/mach-omap2/common.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index 57da7f406e28..c09ca63b8ac8 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h | |||
@@ -27,6 +27,7 @@ | |||
27 | #ifndef __ASSEMBLER__ | 27 | #ifndef __ASSEMBLER__ |
28 | 28 | ||
29 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
30 | #include <linux/i2c/twl.h> | ||
30 | #include <plat/common.h> | 31 | #include <plat/common.h> |
31 | #include <asm/proc-fns.h> | 32 | #include <asm/proc-fns.h> |
32 | 33 | ||
@@ -254,6 +255,8 @@ static inline u32 omap4_mpuss_read_prev_context_state(void) | |||
254 | struct omap_sdrc_params; | 255 | struct omap_sdrc_params; |
255 | extern void omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0, | 256 | extern void omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0, |
256 | struct omap_sdrc_params *sdrc_cs1); | 257 | struct omap_sdrc_params *sdrc_cs1); |
258 | struct omap2_hsmmc_info; | ||
259 | extern int omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers); | ||
257 | 260 | ||
258 | #endif /* __ASSEMBLER__ */ | 261 | #endif /* __ASSEMBLER__ */ |
259 | #endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */ | 262 | #endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */ |