From patchwork Wed Apr 17 13:32:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 2453801 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 894BBDF23A for ; Wed, 17 Apr 2013 13:33:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966321Ab3DQNdH (ORCPT ); Wed, 17 Apr 2013 09:33:07 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:38041 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966186Ab3DQNdG (ORCPT ); Wed, 17 Apr 2013 09:33:06 -0400 Received: by mail-wi0-f173.google.com with SMTP id c10so440802wiw.12 for ; Wed, 17 Apr 2013 06:33:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=3yIF7pzIAssnOoK7avO8knGWUr6e0Q2uPCAraD2XJNA=; b=gY8dZ4yD3Bqnh3AiXhqhGxIWFZKUeXfHbzdh07Xauq5HcrNC/kDD/QDILIblpbGaFO f4azb99s/tEw4rHkGwx+pY2PwNXXVVSCzqW5+3rNGm/YvFmNXN8DMHJTo3+JVNYHrGon Ro1bMaHjn51ui75sbHG9MRlxexmqnhYqoiXhq18GvNMYnII6LkKs/GTWzgbnJUb86tfn 2TbQpMy+3BySvVc8asIXaYMKu2Q/c4xqDmukQUQBuBAWYRi/UovDfxNUoNbBt81owjyo KwzAdMpO7qxZnUVoYb8u2GnXtYGr4SeEd2yJ/Y2lCqfANg93AdHhPlFahUJxE2Crzbwv lc5Q== X-Received: by 10.194.222.100 with SMTP id ql4mr11309867wjc.59.1366205584838; Wed, 17 Apr 2013 06:33:04 -0700 (PDT) Received: from mai.home (AToulouse-654-1-349-85.w90-55.abo.wanadoo.fr. [90.55.188.85]) by mx.google.com with ESMTPS id ej8sm25556799wib.9.2013.04.17.06.33.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 17 Apr 2013 06:33:02 -0700 (PDT) From: Daniel Lezcano To: lethal@linux-sh.org, rjw@sisk.pl Cc: linux-sh@vger.kernel.org, linux-pm@vger.kernel.org, patches@linaro.org Subject: [PATCH 2/4] SH: cpuidle: remove CPUIDLE_DRIVER_STATE_START usage Date: Wed, 17 Apr 2013 15:32:55 +0200 Message-Id: <1366205577-11632-2-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1366205577-11632-1-git-send-email-daniel.lezcano@linaro.org> References: <1366205577-11632-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQmaZYkPJE4HfqYcbI7Sleznp68x9qIXGq1myjsGN4/9FdwIg1bpfNwDM1XVRwO9D1dLjrvf Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org From: Daniel Lezcano The CPUIDLE_DRIVER_STATE_START constant is only set when the kernel compilation option CONFIG_ARCH_HAS_CPU_RELAX is set, but this is only relatated to x86, so it is always zero. Remove the reference to this constant in the code. Signed-off-by: Daniel Lezcano --- arch/sh/kernel/cpu/shmobile/cpuidle.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/sh/kernel/cpu/shmobile/cpuidle.c b/arch/sh/kernel/cpu/shmobile/cpuidle.c index 5b44af9..36374cc 100644 --- a/arch/sh/kernel/cpu/shmobile/cpuidle.c +++ b/arch/sh/kernel/cpu/shmobile/cpuidle.c @@ -62,9 +62,7 @@ void sh_mobile_setup_cpuidle(void) struct cpuidle_device *dev = &cpuidle_dev; struct cpuidle_driver *drv = &cpuidle_driver; struct cpuidle_state *state; - int i; - - i = CPUIDLE_DRIVER_STATE_START; + int i = 0; state = &drv->states[i++]; snprintf(state->name, CPUIDLE_NAME_LEN, "C1"); @@ -76,7 +74,7 @@ void sh_mobile_setup_cpuidle(void) state->flags |= CPUIDLE_FLAG_TIME_VALID; state->enter = cpuidle_sleep_enter; - drv->safe_state_index = i-1; + drv->safe_state_index = 0; if (sh_mobile_sleep_supported & SUSP_SH_SF) { state = &drv->states[i++];