From patchwork Fri May 4 17:18:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 8398 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id B9FE523E20 for ; Fri, 4 May 2012 17:18:47 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id 8999DA1858E for ; Fri, 4 May 2012 17:18:47 +0000 (UTC) Received: by mail-yw0-f52.google.com with SMTP id p61so3754467yhp.11 for ; Fri, 04 May 2012 10:18:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=c9AOnC8LikoeoZM1E/ACr2NwuJASxNvBul2mVEUGy4A=; b=LA5zDQmsdsRFnB/YwOGMcxmKaesaqmpwmdLOcAK+2lP/Ltz+T79bhKrq+598OkStB2 Z1wceZD5cPYD7f9mzZVnIzAeRlWyWf4uL8QlyzfdHONQEsq4X25kdPOS9kY/Gvjs4YzE 9X/ndc63/+QxlieZsj9XFdNA9Ea1Nsbr19PctPp4YlgngOTn4oU9X8o8dZ+2P9Okt1pr e91yojnHsdh/3wg6rZHAtZe9zNcgUlr9X9eFkIgOifT59A3vh3KlcGN3wGlOqsYhz+6/ VXHmzMbDahAFiXF9l3+r1KGEeczD1pfEA11H0mZ9ZVREYHreNlxNE7MWz477UVL6R210 aujA== Received: by 10.42.142.71 with SMTP id r7mr3529284icu.7.1336151926769; Fri, 04 May 2012 10:18:46 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.137.198 with SMTP id x6csp102091ibt; Fri, 4 May 2012 10:18:46 -0700 (PDT) Received: by 10.180.83.38 with SMTP id n6mr14869884wiy.4.1336151925662; Fri, 04 May 2012 10:18:45 -0700 (PDT) Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id t45si10708270wec.100.2012.05.04.10.18.45 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 May 2012 10:18:45 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=74.125.82.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) smtp.mail=daniel.lezcano@linaro.org Received: by wera13 with SMTP id a13so2581786wer.37 for ; Fri, 04 May 2012 10:18:45 -0700 (PDT) Received: by 10.180.77.4 with SMTP id o4mr14846962wiw.17.1336151924939; Fri, 04 May 2012 10:18:44 -0700 (PDT) Received: from localhost.localdomain (AToulouse-159-1-109-226.w92-134.abo.wanadoo.fr. [92.134.236.226]) by mx.google.com with ESMTPS id e8sm2457225wiy.3.2012.05.04.10.18.43 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 May 2012 10:18:44 -0700 (PDT) From: Daniel Lezcano To: khilman@ti.com Cc: santosh.shilimkar@ti.com, jean.pihet@newoldbits.com, tony@atomide.com, linux-omap@vger.kernel.org, linaro-dev@lists.linaro.org, linux-arm-kernel@lists.infradead.org, patches@linaro.org Subject: [PATCH 1/2] ARM: OMAP3: cpuidle - check the powerdomain lookup Date: Fri, 4 May 2012 19:18:40 +0200 Message-Id: <1336151921-9485-2-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1336151921-9485-1-git-send-email-daniel.lezcano@linaro.org> References: <1336151921-9485-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQkNtF/FgsIK7HdiDfTUiTPTF8whJZzQ9BXDVOI0/3yz9VH1Z6RyIuHPRCj49V7eClZT4hDL At init time, check the powerdomains lookup is successful otherwise exit the cpuidle driver init function with -ENODEV like what is done for the omap3 cpuidle driver. Signed-off-by: Daniel Lezcano Reviewed-by: Jean Pihet --- arch/arm/mach-omap2/cpuidle34xx.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index f682e17..207bc1c 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c @@ -363,6 +363,9 @@ int __init omap3_idle_init(void) per_pd = pwrdm_lookup("per_pwrdm"); cam_pd = pwrdm_lookup("cam_pwrdm"); + if (!mpu_pd || !core_pd || !per_pd || !cam_pd) + return -ENODEV; + cpuidle_register_driver(&omap3_idle_driver); dev = &per_cpu(omap3_idle_dev, smp_processor_id());