Skip to contentSkip to conversation

ARM: s3c2440: fix boot failure introduced by recent changes in gpiolib

PATCH RESEND Superseded Abdoulaye Walsimou Gaye 2 participants 2 messages Sep 3, 2010 – Sep 7, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 ARM: s3c2440: fix boot failure introduced by recent changes in gpiolib

Recent changes in s3c gpio break mini2440 board and may be others. The problem is that mach-mini2440.c: mini2440_init()
(where we call s3c_gpio_setpull()) is called before s3c2440.c: s3c2440_init() (where we initialize s3c24xx_gpiocfg_default.set_pull function pointer). This causes dereferencing of NULL pointer at boot time and a kernel panic.

---
 arch/arm/plat-s3c24xx/gpiolib.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/plat-s3c24xx/gpiolib.c +2 -0
index 4c0896f..ae9d3c2 100644
@@ -87,6 +87,8 @@ static struct s3c_gpio_cfg s3c24xx_gpiocfg_banka = {
 struct s3c_gpio_cfg s3c24xx_gpiocfg_default = {
 	.set_config	= s3c_gpio_setcfg_s3c24xx,
 	.get_config	= s3c_gpio_getcfg_s3c24xx,
+	.set_pull	= s3c_gpio_setpull_1up,
+	.get_pull	= s3c_gpio_getpull_1up,
 };
 
 struct s3c_gpio_chip s3c24xx_gpios[] = {
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH RESEND 1/1 ARM: s3c2440: fix boot failure introduced by recent changes in gpiolib

Quoted 7 lines · Abdoulaye Walsimou Gaye

Recent changes in s3c gpio break mini2440 board and may be others. The problem is that mach-mini2440.c: mini2440_init()
(where we call s3c_gpio_setpull()) is called before s3c2440.c: s3c2440_init() (where we initialize s3c24xx_gpiocfg_default.set_pull function pointer). This causes dereferencing of NULL pointer at boot time and a kernel panic.

ok, i'll think over this. it is probably the right thing to do.