From patchwork Sun May 3 18:15:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasily Khoruzhick X-Patchwork-Id: 6321711 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 29C80BEEE1 for ; Sun, 3 May 2015 18:18:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A1E8820386 for ; Sun, 3 May 2015 18:18:51 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AD8DC20380 for ; Sun, 3 May 2015 18:18:50 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YoyQp-0000In-Ag; Sun, 03 May 2015 18:15:59 +0000 Received: from mail-la0-x230.google.com ([2a00:1450:4010:c03::230]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YoyQb-0000FM-NX for linux-arm-kernel@lists.infradead.org; Sun, 03 May 2015 18:15:46 +0000 Received: by lagv1 with SMTP id v1so91441556lag.3 for ; Sun, 03 May 2015 11:15:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jGZy2Itab5D0yWJX7tdYC2RHKA1zTzqgwp+BdIxjG0w=; b=EVc6if1yfuIjdGtauMfgzwls4yzOPQyGj5PJF4WLj3wLDnMwr2qqH1LR9K+grONfja +RqNtZvlze96v3ojDfa+ST/wM/RFJQJ5givHy9usQDmmZfC6L0TjALqH85eD7hE4oiB7 +pXFT9tWizGJhmQbHKKP+wO+iOBLZxH/DBAzQ8uao2p1p/rKemeAwuw2UeVoTwLnmFAH RlIqYAXFswyYTFpp0Fu92gi4yGCS6xStBHkDLg5SflDSbS0780To4rYgaRHwgIuuFN5N zKkjX2lNykYh7Ixdx7GYh1/BNEQcL2L3NXz/XoHngHdB+isy01RKHsW8/Qa8WaZrG9y8 slpQ== X-Received: by 10.152.234.42 with SMTP id ub10mr16360835lac.60.1430676922693; Sun, 03 May 2015 11:15:22 -0700 (PDT) Received: from anarsoul-thinkpad.localdomain ([212.98.188.148]) by mx.google.com with ESMTPSA id c5sm2836659lac.15.2015.05.03.11.15.21 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 03 May 2015 11:15:22 -0700 (PDT) From: Vasily Khoruzhick To: Kukjin Kim , Russell King , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.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 Message-Id: <1430676910-30657-3-git-send-email-anarsoul@gmail.com> X-Mailer: git-send-email 2.3.7 In-Reply-To: <1430676910-30657-1-git-send-email-anarsoul@gmail.com> References: <1430676910-30657-1-git-send-email-anarsoul@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150503_111545_968006_98FE9472 X-CRM114-Status: UNSURE ( 8.85 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.8 (/) Cc: Vasily Khoruzhick X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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);