From patchwork Sat Aug 11 22:17:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael Wysocki X-Patchwork-Id: 1309171 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 0B7103FCF7 for ; Sat, 11 Aug 2012 22:13:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754718Ab2HKWNT (ORCPT ); Sat, 11 Aug 2012 18:13:19 -0400 Received: from ogre.sisk.pl ([193.178.161.156]:34221 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753898Ab2HKWNB (ORCPT ); Sat, 11 Aug 2012 18:13:01 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by ogre.sisk.pl (Postfix) with ESMTP id E931B1DBC8B; Sun, 12 Aug 2012 00:17:50 +0200 (CEST) Received: from ogre.sisk.pl ([127.0.0.1]) by localhost (ogre.sisk.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 08436-01; Sun, 12 Aug 2012 00:17:35 +0200 (CEST) Received: from ferrari.rjw.lan (89-67-90-11.dynamic.chello.pl [89.67.90.11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ogre.sisk.pl (Postfix) with ESMTP id 12DD21DBCA5; Sun, 12 Aug 2012 00:17:35 +0200 (CEST) From: "Rafael J. Wysocki" To: "Linux-sh list" Subject: [PATCH 1/2] ARM: shmobile: Move definition of shmobile_init_late() to header Date: Sun, 12 Aug 2012 00:17:40 +0200 User-Agent: KMail/1.13.6 (Linux/3.5.0+; KDE/4.6.0; x86_64; ; ) Cc: Linux PM list , Magnus Damm References: <201208120016.10195.rjw@sisk.pl> In-Reply-To: <201208120016.10195.rjw@sisk.pl> MIME-Version: 1.0 Message-Id: <201208120017.40317.rjw@sisk.pl> X-Virus-Scanned: amavisd-new at ogre.sisk.pl using MkS_Vir for Linux Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The role of the only function in the common.c file in arch/arm/mach-shmobile, shmobile_init_late(), is to call two initializers whose definitions depend on kernel configuration options. Those initializers may very well be called from a static inline function in arm/mach-shmobile/include/mach/common.h, though, which makes the code a bit easier to read. Moreover, the common.c may be dropped entirely then. Signed-off-by: Rafael J. Wysocki --- arch/arm/mach-shmobile/Makefile | 2 +- arch/arm/mach-shmobile/common.c | 24 ------------------------ arch/arm/mach-shmobile/include/mach/common.h | 8 ++++++-- 3 files changed, 7 insertions(+), 27 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux/arch/arm/mach-shmobile/common.c =================================================================== --- linux.orig/arch/arm/mach-shmobile/common.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ -#include -#include -#include - -void __init shmobile_init_late(void) -{ - shmobile_suspend_init(); - shmobile_cpuidle_init(); -} Index: linux/arch/arm/mach-shmobile/include/mach/common.h =================================================================== --- linux.orig/arch/arm/mach-shmobile/include/mach/common.h +++ linux/arch/arm/mach-shmobile/include/mach/common.h @@ -86,8 +86,6 @@ extern int r8a7779_boot_secondary(unsign extern void r8a7779_smp_prepare_cpus(void); extern void r8a7779_register_twd(void); -extern void shmobile_init_late(void); - #ifdef CONFIG_SUSPEND int shmobile_suspend_init(void); #else @@ -100,4 +98,10 @@ int shmobile_cpuidle_init(void); static inline int shmobile_cpuidle_init(void) { return 0; } #endif +static inline void shmobile_init_late(void) +{ + shmobile_suspend_init(); + shmobile_cpuidle_init(); +} + #endif /* __ARCH_MACH_COMMON_H */ Index: linux/arch/arm/mach-shmobile/Makefile =================================================================== --- linux.orig/arch/arm/mach-shmobile/Makefile +++ linux/arch/arm/mach-shmobile/Makefile @@ -3,7 +3,7 @@ # # Common objects -obj-y := timer.o console.o clock.o common.o +obj-y := timer.o console.o clock.o # CPU objects obj-$(CONFIG_ARCH_SH7367) += setup-sh7367.o clock-sh7367.o intc-sh7367.o