diff options
author | Rafael J. Wysocki | 2020-02-27 11:21:23 +0100 |
---|---|---|
committer | Rafael J. Wysocki | 2020-02-27 11:21:23 +0100 |
commit | 1df97a02a937abf8473ccf0ef12edefcb11671de (patch) | |
tree | d8e76c0c64f92487d7fcb54da2fb08fcb1bc8a11 | |
parent | f8788d86ab28f61f7b46eb6be375f8a726783636 (diff) | |
parent | 66d0e797bf095d407479c89952d42b1d96ef0a7f (diff) |
Merge tag 'devfreq-fixes-for-5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux
Pull a devfreq fix for 5.6-rc4 from Chanwoo Choi:
"Revert "PM / devfreq: Modify the device name as devfreq(X) for sysfs"
- This changes as devfreq(X) cause break some user space applications
such as Android HAL from Unisoc and Hikey. In result, decide to revert it
for preventing the HAL layer problem."
* tag 'devfreq-fixes-for-5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux:
Revert "PM / devfreq: Modify the device name as devfreq(X) for sysfs"
-rw-r--r-- | drivers/devfreq/devfreq.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index cceee8bc3c2f..7dcf2093e531 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -738,7 +738,6 @@ struct devfreq *devfreq_add_device(struct device *dev, { struct devfreq *devfreq; struct devfreq_governor *governor; - static atomic_t devfreq_no = ATOMIC_INIT(-1); int err = 0; if (!dev || !profile || !governor_name) { @@ -800,8 +799,7 @@ struct devfreq *devfreq_add_device(struct device *dev, devfreq->suspend_freq = dev_pm_opp_get_suspend_opp_freq(dev); atomic_set(&devfreq->suspend_count, 0); - dev_set_name(&devfreq->dev, "devfreq%d", - atomic_inc_return(&devfreq_no)); + dev_set_name(&devfreq->dev, "%s", dev_name(dev)); err = device_register(&devfreq->dev); if (err) { mutex_unlock(&devfreq->lock); |