summaryrefslogtreecommitdiffstats
path: root/drivers/devfreq/governor_userspace.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-02-20 14:23:40 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-02-20 14:23:40 +0100
commit41ef3d1df037a429703db503e98fa948ee34b895 (patch)
tree611d15d08b45efd9c8c9ea0ae1aa8b4498b1ba7e /drivers/devfreq/governor_userspace.c
parentad7eec4244a8c6b53a0d38d6fd674e9d2c92897f (diff)
parent23b017a623a0bd19c24e6c1c41fe587c644e9dbc (diff)
downloadop-kernel-dev-41ef3d1df037a429703db503e98fa948ee34b895.zip
op-kernel-dev-41ef3d1df037a429703db503e98fa948ee34b895.tar.gz
Merge branch 'pm-devfreq'
* pm-devfreq: PM / devfreq: Modify the device name as devfreq(X) for sysfs PM / devfreq: Simplify the sysfs name of devfreq-event device PM / devfreq: Remove unnecessary separate _remove_devfreq() PM / devfreq: Fix wrong trans_stat of passive devfreq device PM / devfreq: Fix available_governor sysfs PM / devfreq: exynos-ppmu: Show the registred device for ppmu device PM / devfreq: Fix the wrong description for userspace governor PM / devfreq: Fix the checkpatch warnings PM / devfreq: exynos-bus: Print the real clock rate of bus PM / devfreq: exynos-ppmu: Use the regmap interface to handle the registers PM / devfreq: exynos-bus: Add the detailed correlation for Exynos5433 PM / devfreq: Don't delete sysfs group twice
Diffstat (limited to 'drivers/devfreq/governor_userspace.c')
-rw-r--r--drivers/devfreq/governor_userspace.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/devfreq/governor_userspace.c b/drivers/devfreq/governor_userspace.c
index 35de6e8..1769760 100644
--- a/drivers/devfreq/governor_userspace.c
+++ b/drivers/devfreq/governor_userspace.c
@@ -1,5 +1,5 @@
/*
- * linux/drivers/devfreq/governor_simpleondemand.c
+ * linux/drivers/devfreq/governor_userspace.c
*
* Copyright (C) 2011 Samsung Electronics
* MyungJoo Ham <myungjoo.ham@samsung.com>
@@ -50,7 +50,6 @@ static ssize_t store_freq(struct device *dev, struct device_attribute *attr,
unsigned long wanted;
int err = 0;
-
mutex_lock(&devfreq->lock);
data = devfreq->data;
@@ -112,7 +111,13 @@ out:
static void userspace_exit(struct devfreq *devfreq)
{
- sysfs_remove_group(&devfreq->dev.kobj, &dev_attr_group);
+ /*
+ * Remove the sysfs entry, unless this is being called after
+ * device_del(), which should have done this already via kobject_del().
+ */
+ if (devfreq->dev.kobj.sd)
+ sysfs_remove_group(&devfreq->dev.kobj, &dev_attr_group);
+
kfree(devfreq->data);
devfreq->data = NULL;
}
OpenPOWER on IntegriCloud