From patchwork Sat Oct 12 01:36:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20989 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f198.google.com (mail-qc0-f198.google.com [209.85.216.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 20C032611D for ; Sat, 12 Oct 2013 01:36:17 +0000 (UTC) Received: by mail-qc0-f198.google.com with SMTP id v14sf8680302qcr.9 for ; Fri, 11 Oct 2013 18:36:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=IMfMRrNNEzccblACE44OsQjoGZAAhaqthe2fs1LdvhA=; b=EGcs5L8cS7aDQsNY/j8lmopTCwfKVQ/d81UJJCRkmFLUBx8wJ1CpaTQV9mFY7U7GA1 b+m+TFeNnMnKKc/wC4FiNJwtWx0gtnu6NqrK/nuXYkQLu8F7HNzR5AZy443I2l8ZK27J oNVLAvxstlg3FbRCzqKP8+je4zaK7blUzqqkL0PKRDJJxu8IDNfJP5F+iTFbPsh42xBA 5+E0XmtWVnU9XiJzgHHP0LGp2ac1OMp7qw/c6VJkHWH+vclLuYNWUHzpp9wfIgVFb+pg RlxziB6on1DeTxhR5MUpS1Jfs3XjgLI7yP/uH3c1JlqCHv6ttUirrYKAL2u+cF3mbJE6 TzdA== X-Received: by 10.236.117.136 with SMTP id j8mr19212459yhh.18.1381541777368; Fri, 11 Oct 2013 18:36:17 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.94.196 with SMTP id de4ls1660724qeb.77.gmail; Fri, 11 Oct 2013 18:36:17 -0700 (PDT) X-Received: by 10.220.16.73 with SMTP id n9mr23699193vca.24.1381541777216; Fri, 11 Oct 2013 18:36:17 -0700 (PDT) Received: from mail-vb0-f41.google.com (mail-vb0-f41.google.com [209.85.212.41]) by mx.google.com with ESMTPS id lu1si17813243vcb.13.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Oct 2013 18:36:17 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.41 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.41; Received: by mail-vb0-f41.google.com with SMTP id g17so3308070vbg.14 for ; Fri, 11 Oct 2013 18:36:17 -0700 (PDT) X-Gm-Message-State: ALoCoQllRrJb3Fn4eI8/E6RfEDh4d01teZNBqQDBNaO/JaZ2MgfQR0zYGQQAQWNpgguAkKMJAGkD X-Received: by 10.52.116.74 with SMTP id ju10mr19754393vdb.20.1381541777009; Fri, 11 Oct 2013 18:36:17 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp81846vcz; Fri, 11 Oct 2013 18:36:16 -0700 (PDT) X-Received: by 10.67.22.67 with SMTP id hq3mr24772610pad.132.1381541776009; Fri, 11 Oct 2013 18:36:16 -0700 (PDT) Received: from mail-pb0-f46.google.com (mail-pb0-f46.google.com [209.85.160.46]) by mx.google.com with ESMTPS id we8si824511pac.5.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Oct 2013 18:36:15 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.46 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.46; Received: by mail-pb0-f46.google.com with SMTP id rq2so4999376pbb.33 for ; Fri, 11 Oct 2013 18:36:15 -0700 (PDT) X-Received: by 10.68.232.74 with SMTP id tm10mr23330990pbc.64.1381541775368; Fri, 11 Oct 2013 18:36:15 -0700 (PDT) Received: from localhost ([223.229.180.27]) by mx.google.com with ESMTPSA id yh1sm62726946pbc.21.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 11 Oct 2013 18:36:14 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Viresh Kumar Subject: [PATCH] cpufreq: acpi: Add comment under ACPI_ADR_SPACE_SYSTEM_IO case Date: Sat, 12 Oct 2013 07:06:03 +0530 Message-Id: <6334c0aed4840857944d1b267871ada4d7014d57.1381541632.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.41 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , policy->cur is now set by cpufreq core when cpufreq_driver->get() is defined and so drivers aren't required to set it. When space_id is ACPI_ADR_SPACE_SYSTEM_IO for acpi cpufreq driver it doesn't set ->get to a valid function pointer and so policy->cur is required to be set by driver. This is already followed in acpi-cpufreq driver. This patch adds a comment describing why we need to set policy->cur from driver. Suggested-by: Rafael J. Wysocki Signed-off-by: Viresh Kumar --- This change was requested by Rafael here: http://www.spinics.net/lists/linux-acpi/msg46748.html drivers/cpufreq/acpi-cpufreq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c index a8dac7b..8ecd74e 100644 --- a/drivers/cpufreq/acpi-cpufreq.c +++ b/drivers/cpufreq/acpi-cpufreq.c @@ -838,6 +838,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) switch (perf->control_register.space_id) { case ACPI_ADR_SPACE_SYSTEM_IO: /* Current speed is unknown and not detectable by IO port */ + /* ->cur wouldn't be set by core as ->get() is NULL */ policy->cur = acpi_cpufreq_guess_freq(data, policy->cpu); break; case ACPI_ADR_SPACE_FIXED_HARDWARE: