From patchwork Wed Mar 19 19:29:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 3860581 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D28F79F334 for ; Wed, 19 Mar 2014 19:30:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E1F4820218 for ; Wed, 19 Mar 2014 19:30:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1A994201FB for ; Wed, 19 Mar 2014 19:30:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752457AbaCSTam (ORCPT ); Wed, 19 Mar 2014 15:30:42 -0400 Received: from moutng.kundenserver.de ([212.227.17.10]:57424 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751168AbaCSTal (ORCPT ); Wed, 19 Mar 2014 15:30:41 -0400 Received: from wuerfel.lan (HSI-KBW-134-3-135-108.hsi14.kabel-badenwuerttemberg.de [134.3.135.108]) by mrelayeu.kundenserver.de (node=mreue105) with ESMTP (Nemesis) id 0M7Jw6-1XMzDn2nbi-00wzke; Wed, 19 Mar 2014 20:30:37 +0100 From: Arnd Bergmann To: arm@kernel.org Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , linux-omap@vger.kernel.org, Tony Lindgren Subject: [PATCH 23/62] ARM: omap1: fix building without 32K_TIMER Date: Wed, 19 Mar 2014 20:29:20 +0100 Message-Id: <1395257399-359545-24-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1395257399-359545-1-git-send-email-arnd@arndb.de> References: <1395257399-359545-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:1w+VndjSSISzwc2YOMsrQVkIN0ZuVupVmepbDBkPtbG 9fllpHdFh6qiDPdp95nJTrX7VJBl2vPjgDNakFqD333YnyshJw /dwdrDeGXDc6mIik4odDXuZ0FMAZ7vzX/dzvB2jNCD7ih6oHL0 /mOnXa3PdupbKWkv4TU5I2QkiWJE0u3NaPmk2lCSCDOezgH3/u D1Sz5TOXe/5GzYIuSFaohWVekUayN9hvs75wTHoV12ycMBY/Ot ZVjeAYADUFxmsWwqyX1YEzFLcsCkVBP7cDKjAJVsX1sGXxCEj8 F4QCWxtW8OFpLlwB1b7OKkIOpiCXpMZ2aKSU/qwEw1YxJ4UgRZ 9EpB5HIJuSg64uOHL1nfcuFP9l4fmFT/Fe3aNE5zo Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 If we enable CONFIG_OMAP_MPU_TIMER and CONFIG_OMAP_DM_TIMER but not CONFIG_OMAP_32K_TIMER on OMAP1, we currently get this build error: mach-omap1/pm.c: In function 'omap1_pm_idle': mach-omap1/pm.c:123:9: error: 'enable_dyn_sleep' undeclared (first use in this function) while (enable_dyn_sleep) { ^ mach-omap1/pm.c:123:9: note: each undeclared identifier is reported only once for each function it appears in This attempts to fix the #ifdef logic to deal with all combinations of timers. Signed-off-by: Arnd Bergmann Cc: linux-omap@vger.kernel.org Cc: Tony Lindgren Acked-by: Tony Lindgren --- arch/arm/mach-omap1/pm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index 40a1ae3..7dff68e 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c @@ -71,10 +71,10 @@ static unsigned int mpui7xx_sleep_save[MPUI7XX_SLEEP_SAVE_SIZE]; static unsigned int mpui1510_sleep_save[MPUI1510_SLEEP_SAVE_SIZE]; static unsigned int mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_SIZE]; -#ifdef CONFIG_OMAP_32K_TIMER - static unsigned short enable_dyn_sleep = 1; +#if defined(CONFIG_OMAP_32K_TIMER) || defined(CONFIG_OMAP_MPU_TIMER) + static ssize_t idle_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { @@ -643,7 +643,7 @@ static const struct platform_suspend_ops omap_pm_ops = { static int __init omap_pm_init(void) { -#ifdef CONFIG_OMAP_32K_TIMER +#if defined(CONFIG_OMAP_32K_TIMER) || defined(CONFIG_OMAP_MPU_TIMER) int error; #endif @@ -700,7 +700,7 @@ static int __init omap_pm_init(void) omap_pm_init_debugfs(); #endif -#ifdef CONFIG_OMAP_32K_TIMER +#if defined(CONFIG_OMAP_32K_TIMER) || defined(CONFIG_OMAP_MPU_TIMER) error = sysfs_create_file(power_kobj, &sleep_while_idle_attr.attr); if (error) printk(KERN_ERR "sysfs_create_file failed: %d\n", error);