From patchwork Tue Aug 20 06:38:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19342 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f199.google.com (mail-ve0-f199.google.com [209.85.128.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 32C6725E2C for ; Tue, 20 Aug 2013 06:40:24 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id m1sf19252ves.10 for ; Mon, 19 Aug 2013 23:40:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=4qjAdjH+z5NzHj5B6XP7IwzGxBHlapVYVlnClwJFzz8=; b=EFQ9ooLgw1Li3FZmbQffoPyNMrgOakSZNOTWeeeKU2UpzRMky+CMhWJbDGJeteGCoX AZjZb1oFkMZoYu4UJkd0zakryNJIJGE8w6ehx0lnNwOwW0tD07oTvmXyxtz7u/VnNg36 ppNQvxqTrXw2ffKbBQLdADe/jQeed9TIBPcxTaEZw+9g8xDG/f8UgNJ7hT8jQM8LvEcX CnKv3FDooYLAYvedfE/A0IrBRabh9oe0UIV3+769unwU+FCoub1LYW0opSVxybuUON/R l5rBFJ5ST9rGPcpBEtseuXC3eBA4bDsnQOIt0zBxJfjHN6/Ks4Cvoi9ggk4+zkWz9Iv1 miyQ== X-Received: by 10.236.153.39 with SMTP id e27mr20171yhk.14.1376980823779; Mon, 19 Aug 2013 23:40:23 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.74.102 with SMTP id s6ls125518qev.17.gmail; Mon, 19 Aug 2013 23:40:23 -0700 (PDT) X-Received: by 10.58.86.7 with SMTP id l7mr28688vez.65.1376980823643; Mon, 19 Aug 2013 23:40:23 -0700 (PDT) Received: from mail-vb0-f48.google.com (mail-vb0-f48.google.com [209.85.212.48]) by mx.google.com with ESMTPS id kj9si9808veb.107.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 19 Aug 2013 23:40:23 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.48 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.48; Received: by mail-vb0-f48.google.com with SMTP id w16so11861vbf.35 for ; Mon, 19 Aug 2013 23:40:23 -0700 (PDT) X-Gm-Message-State: ALoCoQmbmS4VuTq86Xn1jmzH54gQyl8jgeBYjLAnCLabm4aFlFTYGNpQguxuUVRV+3ekZAp3J7Ix X-Received: by 10.58.211.227 with SMTP id nf3mr17534vec.20.1376980823414; Mon, 19 Aug 2013 23:40:23 -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 u4csp138868vcz; Mon, 19 Aug 2013 23:40:22 -0700 (PDT) X-Received: by 10.68.12.97 with SMTP id x1mr6599295pbb.150.1376980822553; Mon, 19 Aug 2013 23:40:22 -0700 (PDT) Received: from mail-pb0-f43.google.com (mail-pb0-f43.google.com [209.85.160.43]) by mx.google.com with ESMTPS id sl4si1349806pac.184.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 19 Aug 2013 23:40:22 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.43 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.43; Received: by mail-pb0-f43.google.com with SMTP id md4so26604pbc.2 for ; Mon, 19 Aug 2013 23:40:22 -0700 (PDT) X-Received: by 10.69.17.1 with SMTP id ga1mr71331pbd.38.1376980822159; Mon, 19 Aug 2013 23:40:22 -0700 (PDT) Received: from localhost ([106.200.1.10]) by mx.google.com with ESMTPSA id ll5sm1739357pab.19.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 19 Aug 2013 23:40:21 -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 3/5] cpufreq: remove unnecessary check in __cpufreq_governor() Date: Tue, 20 Aug 2013 12:08:24 +0530 Message-Id: <609fce7109561fc217544e0ef63d750ea45db1a8.1376979090.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: 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.48 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: , We don't need to check if event is CPUFREQ_GOV_POLICY_INIT and put governor module as we are sure event can only be START/STOP here. And so remove this useless check. Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 0302121..b03a851 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1719,8 +1719,6 @@ static int __cpufreq_governor(struct cpufreq_policy *policy, if ((!policy->governor_enabled && (event == CPUFREQ_GOV_STOP)) || (policy->governor_enabled && (event == CPUFREQ_GOV_START))) { mutex_unlock(&cpufreq_governor_lock); - if (event == CPUFREQ_GOV_POLICY_INIT) - module_put(policy->governor->owner); return -EBUSY; }