]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
PM / devfreq: Remove redundant devfreq_get_freq_range() calling in devfreq_add_device()
authorLifeng Zheng <zhenglifeng1@huawei.com>
Mon, 21 Apr 2025 03:00:19 +0000 (11:00 +0800)
committerChanwoo Choi <cw00.choi@samsung.com>
Mon, 14 Jul 2025 11:04:16 +0000 (20:04 +0900)
The calling of devfreq_get_freq_range() in devfreq_add_device() is
redundant because min_freq and max_freq are never used. Remove it.

Signed-off-by: Lifeng Zheng <zhenglifeng1@huawei.com>
Link: https://lore.kernel.org/lkml/20250421030020.3108405-4-zhenglifeng1@huawei.com/
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/devfreq/devfreq.c

index 2810c84b9f8a29c490b45971ca4fb0baab3d24f0..18e3f7e063a4bff49f21c1a71af99ec486aa82d0 100644 (file)
@@ -804,7 +804,6 @@ struct devfreq *devfreq_add_device(struct device *dev,
 {
        struct devfreq *devfreq;
        struct devfreq_governor *governor;
-       unsigned long min_freq, max_freq;
        int err = 0;
 
        if (!dev || !profile || !governor_name) {
@@ -872,8 +871,6 @@ struct devfreq *devfreq_add_device(struct device *dev,
                goto err_dev;
        }
 
-       devfreq_get_freq_range(devfreq, &min_freq, &max_freq);
-
        devfreq->suspend_freq = dev_pm_opp_get_suspend_opp_freq(dev);
        devfreq->opp_table = dev_pm_opp_get_opp_table(dev);
        if (IS_ERR(devfreq->opp_table))