From: anarsoul@gmail.com (Vasily Khoruzhick)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] ARM: s3c24xx: H1940: Move gpiochip_add call into core_init() callback
Date: Sun, 3 May 2015 21:15:10 +0300 [thread overview]
Message-ID: <1430676910-30657-3-git-send-email-anarsoul@gmail.com> (raw)
In-Reply-To: <1430676910-30657-1-git-send-email-anarsoul@gmail.com>
gpiochip_add() allocates memory, however it's not possible anymore from
machine map_io() callback thus it failed and prevented machine from booting
properly.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---
arch/arm/mach-s3c24xx/mach-h1940.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
index 86d9ec7..744aa4f 100644
--- a/arch/arm/mach-s3c24xx/mach-h1940.c
+++ b/arch/arm/mach-s3c24xx/mach-h1940.c
@@ -777,9 +777,14 @@ static void __init h1940_map_io(void)
/* Add latch gpio chip, set latch initial value */
h1940_latch_control(0, 0);
- WARN_ON(gpiochip_add(&h1940_latch_gpiochip));
}
+static __init int h1940_gpiolib_init(void)
+{
+ return gpiochip_add(&h1940_latch_gpiochip);
+}
+core_initcall(h1940_gpiolib_init);
+
static void __init h1940_init_time(void)
{
s3c2410_init_clocks(12000000);
--
2.3.5
next prev parent reply other threads:[~2015-05-03 18:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-03 18:15 [PATCH 1/3] ARM: s3c24xx: add dma_coherent_mask for DMA devices Vasily Khoruzhick
2015-05-03 18:15 ` [PATCH 2/3] ARM: s3c24xx: Add DMA resources for SDI and I2S Vasily Khoruzhick
2015-05-04 3:45 ` Krzysztof Kozlowski
2015-05-04 18:10 ` Vasily Khoruzhick
2015-05-05 3:39 ` Krzysztof Kozlowski
2015-05-03 18:15 ` Vasily Khoruzhick [this message]
2015-05-04 3:23 ` [PATCH 3/3] ARM: s3c24xx: H1940: Move gpiochip_add call into core_init() callback Krzysztof Kozlowski
2015-05-04 18:27 ` Vasily Khoruzhick
2015-05-05 3:51 ` Krzysztof Kozlowski
2015-05-04 3:42 ` [PATCH 1/3] ARM: s3c24xx: add dma_coherent_mask for DMA devices Krzysztof Kozlowski
2015-05-04 17:54 ` Vasily Khoruzhick
2015-05-05 3:38 ` Krzysztof Kozlowski
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=1430676910-30657-3-git-send-email-anarsoul@gmail.com \
--to=anarsoul@gmail.com \
--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).