All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yue Hu <zbestahu@gmail.com>
To: myungjoo.ham@samsung.com, kyungmin.park@samsung.com,
	cw00.choi@samsung.com
Cc: linux-pm@vger.kernel.org, huyue2@yulong.com
Subject: [PATCH] PM / devfreq: Drop the name check to request module in try_then_request_governor()
Date: Tue, 30 Jul 2019 18:08:19 +0800	[thread overview]
Message-ID: <20190730100819.8056-1-zbestahu@gmail.com> (raw)

From: Yue Hu <huyue2@yulong.com>

No need to check specific governor name of `simple_ondemand` to request
module, let's change the name string to `simpleondemand` to keep the
consistency on loading module if needed.

Signed-off-by: Yue Hu <huyue2@yulong.com>
---
 drivers/devfreq/devfreq.c | 6 +-----
 include/linux/devfreq.h   | 2 +-
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 784c08e..baff682 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -246,11 +246,7 @@ static struct devfreq_governor *try_then_request_governor(const char *name)
 	if (IS_ERR(governor)) {
 		mutex_unlock(&devfreq_list_lock);
 
-		if (!strncmp(name, DEVFREQ_GOV_SIMPLE_ONDEMAND,
-			     DEVFREQ_NAME_LEN))
-			err = request_module("governor_%s", "simpleondemand");
-		else
-			err = request_module("governor_%s", name);
+		err = request_module("governor_%s", name);
 		/* Restore previous state before return */
 		mutex_lock(&devfreq_list_lock);
 		if (err)
diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h
index 2bae9ed..41e8792 100644
--- a/include/linux/devfreq.h
+++ b/include/linux/devfreq.h
@@ -17,7 +17,7 @@
 #define DEVFREQ_NAME_LEN 16
 
 /* DEVFREQ governor name */
-#define DEVFREQ_GOV_SIMPLE_ONDEMAND	"simple_ondemand"
+#define DEVFREQ_GOV_SIMPLE_ONDEMAND	"simpleondemand"
 #define DEVFREQ_GOV_PERFORMANCE		"performance"
 #define DEVFREQ_GOV_POWERSAVE		"powersave"
 #define DEVFREQ_GOV_USERSPACE		"userspace"
-- 
1.9.1


             reply	other threads:[~2019-07-30 10:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20190730100844epcas4p14dfa39fff2636e89c94033f154240db0@epcas4p1.samsung.com>
2019-07-30 10:08 ` Yue Hu [this message]
2019-07-31  0:33   ` [PATCH] PM / devfreq: Drop the name check to request module in try_then_request_governor() Chanwoo Choi
2019-07-31  5:38     ` Yue Hu
2019-07-31  5:55       ` Chanwoo Choi
2019-07-31  5:57         ` Yue Hu
2019-07-31  6:02           ` Chanwoo Choi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190730100819.8056-1-zbestahu@gmail.com \
    --to=zbestahu@gmail.com \
    --cc=cw00.choi@samsung.com \
    --cc=huyue2@yulong.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.