From patchwork Mon Sep 17 14:55:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 1467771 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id C83293FE79 for ; Mon, 17 Sep 2012 14:58:47 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TDcjP-0002Gh-Ht; Mon, 17 Sep 2012 14:55:27 +0000 Received: from mail-ob0-f177.google.com ([209.85.214.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TDcjN-0002GK-87 for linux-arm-kernel@lists.infradead.org; Mon, 17 Sep 2012 14:55:25 +0000 Received: by obbta17 with SMTP id ta17so9510037obb.36 for ; Mon, 17 Sep 2012 07:55:24 -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:x-mailer; bh=QCldt/Ji2emY05mID/7lmO1+8Fz2+z6RnqWfLnK7EK0=; b=YTTDNAYMnL9J21+9ltpTnVNAGjdsn2xLzcm3RHBde02prFPjlsb/LIfN2O8TxZuv3W Zsn0a8hxuf8DJcnx0G9s5CiI7htIJV7wL3sH6+EUtWw8ErGktjCOkEKQWi2H9u76P/VC bMOg2qDFA/D6hvSdXuAPS3KZzZuDvj7hgWa9QsFUZ5Z2YGiQlZgaRn3HYTIOk8Q1EKmD VIkiO1BDs8uusNqT0hPLRFfruE9SfI7f/xh2uAv4PFF/UfF2u/NteUA/SvIK2/Zz+ZaT 4VI8ib+PlYZdgdCh+9rE1+C8FLl9ilB4/deTd8uL7WQOMIaVpKl1jxb/Ml6ympUZFuXn LDJA== Received: by 10.60.170.229 with SMTP id ap5mr11672982oec.101.1347893723964; Mon, 17 Sep 2012 07:55:23 -0700 (PDT) Received: from rob-laptop.calxeda.com ([173.226.190.126]) by mx.google.com with ESMTPS id l9sm8769467oeg.3.2012.09.17.07.55.21 (version=SSLv3 cipher=OTHER); Mon, 17 Sep 2012 07:55:22 -0700 (PDT) From: Rob Herring To: arm@kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: highbank: call highbank_pm_init from .init_machine Date: Mon, 17 Sep 2012 09:55:12 -0500 Message-Id: <1347893712-21819-1-git-send-email-robherring2@gmail.com> X-Mailer: git-send-email 1.7.9.5 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.214.177 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (robherring2[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (robherring2[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Shawn Guo , Rob Herring X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Rob Herring Being a module_init call, highbank_pm_init will cause problem with multi-platform build running on other platforms. Call it from .init_machine instead. Reported-by: Shawn Guo Signed-off-by: Rob Herring --- Arnd, Olof, Can you please apply this to the multi-platform branch or I can send an updated pull request if you prefer. Rob arch/arm/mach-highbank/core.h | 6 ++++++ arch/arm/mach-highbank/highbank.c | 1 + arch/arm/mach-highbank/pm.c | 4 +--- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-highbank/core.h b/arch/arm/mach-highbank/core.h index 141ed51..8b9fb1a 100644 --- a/arch/arm/mach-highbank/core.h +++ b/arch/arm/mach-highbank/core.h @@ -8,4 +8,10 @@ extern void highbank_lluart_map_io(void); static inline void highbank_lluart_map_io(void) {} #endif +#ifdef CONFIG_PM_SLEEP +extern void highbank_pm_init(void); +#else +static inline void highbank_pm_init(void) {} +#endif + extern void highbank_smc1(int fn, int arg); diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c index d75b0a7..f376c26 100644 --- a/arch/arm/mach-highbank/highbank.c +++ b/arch/arm/mach-highbank/highbank.c @@ -152,6 +152,7 @@ static void highbank_power_off(void) static void __init highbank_init(void) { pm_power_off = highbank_power_off; + highbank_pm_init(); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); } diff --git a/arch/arm/mach-highbank/pm.c b/arch/arm/mach-highbank/pm.c index 33b3beb..de866f2 100644 --- a/arch/arm/mach-highbank/pm.c +++ b/arch/arm/mach-highbank/pm.c @@ -47,9 +47,7 @@ static const struct platform_suspend_ops highbank_pm_ops = { .valid = suspend_valid_only_mem, }; -static int __init highbank_pm_init(void) +void __init highbank_pm_init(void) { suspend_set_ops(&highbank_pm_ops); - return 0; } -module_init(highbank_pm_init);