linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: awg@embtoolkit.org (Abdoulaye Walsimou Gaye)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RESEND 2/2] ARM: s3c2440: fix boot failure introduced by recent changes in gpiolib
Date: Sat, 16 Oct 2010 13:55:52 +0200	[thread overview]
Message-ID: <1287230152-5544-2-git-send-email-awg@embtoolkit.org> (raw)
In-Reply-To: <1287230152-5544-1-git-send-email-awg@embtoolkit.org>

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 at lists.infradead.org
Cc: linux-samsung-soc at vger.kernel.org
---

Issue reported 4 months ago[1] and since prevents boards to boot
[1]: http://www.spinics.net/lists/arm-kernel/msg90151.html

 arch/arm/plat-s3c24xx/gpiolib.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-s3c24xx/gpiolib.c b/arch/arm/plat-s3c24xx/gpiolib.c
index 4c0896f..ae9d3c2 100644
--- a/arch/arm/plat-s3c24xx/gpiolib.c
+++ b/arch/arm/plat-s3c24xx/gpiolib.c
@@ -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[] = {
-- 
1.7.0.4

      reply	other threads:[~2010-10-16 11:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-16 11:55 [PATCH RESEND V3 1/1] ARM: s3c2440: various fixes in Kconfig file Abdoulaye Walsimou Gaye
2010-10-16 11:55 ` Abdoulaye Walsimou Gaye [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1287230152-5544-2-git-send-email-awg@embtoolkit.org \
    --to=awg@embtoolkit.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).