From patchwork Thu Oct 15 16:05:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 55047 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lf0-f71.google.com (mail-lf0-f71.google.com [209.85.215.71]) by patches.linaro.org (Postfix) with ESMTPS id C123922FFA for ; Thu, 15 Oct 2015 16:06:16 +0000 (UTC) Received: by lfaz124 with SMTP id z124sf4771287lfa.0 for ; Thu, 15 Oct 2015 09:06:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=fG+gjBnpkhGto2jQ7WFmOdnu02FxYSvUPuf3ozUVhGY=; b=GJbS9XvEzAFIPhX+3c4eUKS49YUii/N7+47O0sQxOQ4KF59D7iCTe2LzcVb1woK4fs rWkUY9s1gJVet77ft9T88vHYB+3OybhYMmEqdEjbNr19CckKq9PAXvczeLHF48zyQu/u sWv8niSnRUzQLHP/sXRzT4RRfxv///xI/dl/P4Jw0V3F3Otizu0tHSSqr9HUc04D8EWW td+/4xD0bTcLfyrD7H+EfqvebDOrAxd5Jbqs9R7/H8+NROCNLPO773Q7ocgt1mQHIIaw +q9II9wfAtdgMOmAhZDcEPTpYRQoY00FYqJWw6XI8v/Vj9Kjk0Ojz9uoMqjPXiuo/tM0 9J1Q== X-Gm-Message-State: ALoCoQnb2UmqmxZui9xwpiE+xXJQELLAgNDIO4IL0NrH7woDpwR5cJzSFsmevaLDTeTej/POVrK9 X-Received: by 10.112.184.170 with SMTP id ev10mr2450001lbc.4.1444925175740; Thu, 15 Oct 2015 09:06:15 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.141.74 with SMTP id p71ls160967lfd.77.gmail; Thu, 15 Oct 2015 09:06:15 -0700 (PDT) X-Received: by 10.112.128.162 with SMTP id np2mr1885166lbb.98.1444925175546; Thu, 15 Oct 2015 09:06:15 -0700 (PDT) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id v9si7557477lby.76.2015.10.15.09.06.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Oct 2015 09:06:15 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by lbbwb3 with SMTP id wb3so12791319lbb.1 for ; Thu, 15 Oct 2015 09:06:15 -0700 (PDT) X-Received: by 10.112.146.104 with SMTP id tb8mr5122083lbb.35.1444925175352; Thu, 15 Oct 2015 09:06:15 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp722254lbq; Thu, 15 Oct 2015 09:06:14 -0700 (PDT) X-Received: by 10.67.5.42 with SMTP id cj10mr10642368pad.128.1444925174307; Thu, 15 Oct 2015 09:06:14 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ez3si22540126pab.130.2015.10.15.09.06.13; Thu, 15 Oct 2015 09:06:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753718AbbJOQGM (ORCPT + 30 others); Thu, 15 Oct 2015 12:06:12 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:36355 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753680AbbJOQGI (ORCPT ); Thu, 15 Oct 2015 12:06:08 -0400 Received: by padcn9 with SMTP id cn9so10097128pad.3 for ; Thu, 15 Oct 2015 09:06:08 -0700 (PDT) X-Received: by 10.68.237.225 with SMTP id vf1mr11034329pbc.82.1444925168153; Thu, 15 Oct 2015 09:06:08 -0700 (PDT) Received: from localhost ([223.227.130.246]) by smtp.gmail.com with ESMTPSA id gw3sm16206725pbc.46.2015.10.15.09.06.05 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 15 Oct 2015 09:06:07 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, skannan@codeaurora.org, Viresh Kumar , linux-kernel@vger.kernel.org (open list) Subject: [PATCH V2 3/5] cpufreq: remove cpufreq_sysfs_{create|remove}_file() Date: Thu, 15 Oct 2015 21:35:23 +0530 Message-Id: <8be4873ecf696c6202b0dc4cbc71258ab5fcdbd5.1444924623.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.4.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , They don't do anything special now, remove the unnecessary wrapper. Reviewed-by: Saravana Kannan Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq.c | 22 +++++----------------- include/linux/cpufreq.h | 2 -- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index c1fd57db50bd..04222e7bbc73 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -873,21 +873,6 @@ static struct kobj_type ktype_cpufreq = { .release = cpufreq_sysfs_release, }; -struct kobject *cpufreq_global_kobject; -EXPORT_SYMBOL(cpufreq_global_kobject); - -int cpufreq_sysfs_create_file(const struct attribute *attr) -{ - return sysfs_create_file(cpufreq_global_kobject, attr); -} -EXPORT_SYMBOL(cpufreq_sysfs_create_file); - -void cpufreq_sysfs_remove_file(const struct attribute *attr) -{ - sysfs_remove_file(cpufreq_global_kobject, attr); -} -EXPORT_SYMBOL(cpufreq_sysfs_remove_file); - static int add_cpu_dev_symlink(struct cpufreq_policy *policy, int cpu) { struct device *cpu_dev; @@ -2390,7 +2375,7 @@ static int create_boost_sysfs_file(void) if (!cpufreq_driver->set_boost) cpufreq_driver->set_boost = cpufreq_boost_set_sw; - ret = cpufreq_sysfs_create_file(&boost.attr); + ret = sysfs_create_file(cpufreq_global_kobject, &boost.attr); if (ret) pr_err("%s: cannot register global BOOST sysfs file\n", __func__); @@ -2401,7 +2386,7 @@ static int create_boost_sysfs_file(void) static void remove_boost_sysfs_file(void) { if (cpufreq_boost_supported()) - cpufreq_sysfs_remove_file(&boost.attr); + sysfs_remove_file(cpufreq_global_kobject, &boost.attr); } int cpufreq_enable_boost_support(void) @@ -2549,6 +2534,9 @@ static struct syscore_ops cpufreq_syscore_ops = { .shutdown = cpufreq_suspend, }; +struct kobject *cpufreq_global_kobject; +EXPORT_SYMBOL(cpufreq_global_kobject); + static int __init cpufreq_core_init(void) { if (cpufreq_disabled()) diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 338bf0e59bb8..9623218d996a 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -149,8 +149,6 @@ static inline bool policy_is_shared(struct cpufreq_policy *policy) /* /sys/devices/system/cpu/cpufreq: entry point for global variables */ extern struct kobject *cpufreq_global_kobject; -int cpufreq_sysfs_create_file(const struct attribute *attr); -void cpufreq_sysfs_remove_file(const struct attribute *attr); #ifdef CONFIG_CPU_FREQ unsigned int cpufreq_get(unsigned int cpu);