From patchwork Sun Oct 11 17:21:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 7369311 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E3FC89F1D5 for ; Sun, 11 Oct 2015 17:22:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0F18820685 for ; Sun, 11 Oct 2015 17:22:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1F05120680 for ; Sun, 11 Oct 2015 17:22:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752209AbbJKRVk (ORCPT ); Sun, 11 Oct 2015 13:21:40 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:36491 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751966AbbJKRVi (ORCPT ); Sun, 11 Oct 2015 13:21:38 -0400 Received: by pablk4 with SMTP id lk4so132723496pab.3 for ; Sun, 11 Oct 2015 10:21:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=MsFZDs6CR5Gw+TVAig1dsM+8XNfW9673myCOohTn9Yg=; b=Gf/uh3Wu12snbSMUsp7DJlLWlm8O601tqZ3kLS9TC2+gamHwHp4KNSz5huRPJsVayF iWd3pjkZg2PenMN4ec4oDTEjxK4sV8+3zv4bkFm+qQM2jfkgkGSvUCNXf5ULWMhe0WEs BCACYljEfAsRhh8+gaEbXY+cpJEV0HxXgm0grpYudTQmzQs9Sve96sPKtn/8OhwMII8M accBN/LDOD1JTpLFJyVNE23xsPiV5FpuYmvcqskb8j0lJte3ajMU9l+oa0Jl+DtKjvsJ Pfc2l804KxyYcsnyA3D7JR+b+ivR/jJWgcUthFWW/AiuUSmVEa2nFlU792baWcXPAZkK rLpQ== X-Gm-Message-State: ALoCoQlmaC4UDNc8iwme4iBOu9mgiCKvWW1oq4tds4jvo9ASrdwsNygmVVxc9gaaO89BSKtYRxVC X-Received: by 10.68.137.35 with SMTP id qf3mr29165455pbb.89.1444584097931; Sun, 11 Oct 2015 10:21:37 -0700 (PDT) Received: from localhost ([120.59.64.42]) by smtp.gmail.com with ESMTPSA id q8sm13752405pap.34.2015.10.11.10.21.36 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 11 Oct 2015 10:21:36 -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 3/5] cpufreq: remove cpufreq_sysfs_{create|remove}_file() Date: Sun, 11 Oct 2015 22:51:12 +0530 Message-Id: X-Mailer: git-send-email 2.4.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP They don't do anything special now, remove the unnecessary wrapper. 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 db688d18a189..2cb0e3b8170e 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -880,21 +880,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; @@ -2397,7 +2382,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__); @@ -2408,7 +2393,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) @@ -2556,6 +2541,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);