Skip to content

Commit

Permalink
ARM: S3C2440: fix boot failure introduced by recent changes in gpiolib
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>

Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
  • Loading branch information
Abdoulaye Walsimou Gaye authored and Ben Dooks committed Oct 29, 2010
1 parent e33ffd4 commit bdf5005
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/arm/plat-s3c24xx/gpiolib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = {
Expand Down

0 comments on commit bdf5005

Please sign in to comment.