PM / devfreq: Make log message more explicit when devfreq device already exists
authorMatthias Kaehlcke <mka@chromium.org>
Thu, 19 Sep 2019 00:09:46 +0000 (17:09 -0700)
committerChanwoo Choi <cw00.choi@samsung.com>
Wed, 6 Nov 2019 03:03:59 +0000 (12:03 +0900)
Before creating a new devfreq device devfreq_add_device() checks
if there is already a devfreq dev associated with the requesting
device (parent). If that's the case the function rejects to create
another devfreq dev for that parent and logs an error. The error
message is very unspecific, make it a bit more explicit.

Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/devfreq/devfreq.c

index 446490c9d635347d1b36634e4f6895d23e1fff3a..b905963cea7ded20a26924828d62d2d853ca32bb 100644 (file)
@@ -625,7 +625,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
        devfreq = find_device_devfreq(dev);
        mutex_unlock(&devfreq_list_lock);
        if (!IS_ERR(devfreq)) {
-               dev_err(dev, "%s: Unable to create devfreq for the device.\n",
+               dev_err(dev, "%s: devfreq device already exists!\n",
                        __func__);
                err = -EINVAL;
                goto err_out;