From: Saravana Kannan <saravanak@google.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Frank Rowand <frowand.list@gmail.com>,
Len Brown <lenb@kernel.org>
Cc: Saravana Kannan <saravanak@google.com>,
kernel-team@android.com, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, linux-acpi@vger.kernel.org,
Ji Luo <ji.luo@nxp.com>
Subject: [PATCH v1 1/4] driver core: Move code to the right part of the file
Date: Thu, 14 May 2020 22:34:57 -0700 [thread overview]
Message-ID: <20200515053500.215929-2-saravanak@google.com> (raw)
In-Reply-To: <20200515053500.215929-1-saravanak@google.com>
This commit just moves around code to match the general organization of
the file.
Signed-off-by: Saravana Kannan <saravanak@google.com>
---
drivers/base/core.c | 60 ++++++++++++++++++++++-----------------------
1 file changed, 30 insertions(+), 30 deletions(-)
diff --git a/drivers/base/core.c b/drivers/base/core.c
index c9045521596f..2b454aae64b5 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -1143,6 +1143,36 @@ static void device_links_purge(struct device *dev)
device_links_write_unlock();
}
+static u32 fw_devlink_flags = DL_FLAG_SYNC_STATE_ONLY;
+static int __init fw_devlink_setup(char *arg)
+{
+ if (!arg)
+ return -EINVAL;
+
+ if (strcmp(arg, "off") == 0) {
+ fw_devlink_flags = 0;
+ } else if (strcmp(arg, "permissive") == 0) {
+ fw_devlink_flags = DL_FLAG_SYNC_STATE_ONLY;
+ } else if (strcmp(arg, "on") == 0) {
+ fw_devlink_flags = DL_FLAG_AUTOPROBE_CONSUMER;
+ } else if (strcmp(arg, "rpm") == 0) {
+ fw_devlink_flags = DL_FLAG_AUTOPROBE_CONSUMER |
+ DL_FLAG_PM_RUNTIME;
+ }
+ return 0;
+}
+early_param("fw_devlink", fw_devlink_setup);
+
+u32 fw_devlink_get_flags(void)
+{
+ return fw_devlink_flags;
+}
+
+static bool fw_devlink_is_permissive(void)
+{
+ return fw_devlink_flags == DL_FLAG_SYNC_STATE_ONLY;
+}
+
/* Device links support end. */
int (*platform_notify)(struct device *dev) = NULL;
@@ -2345,36 +2375,6 @@ static int device_private_init(struct device *dev)
return 0;
}
-static u32 fw_devlink_flags = DL_FLAG_SYNC_STATE_ONLY;
-static int __init fw_devlink_setup(char *arg)
-{
- if (!arg)
- return -EINVAL;
-
- if (strcmp(arg, "off") == 0) {
- fw_devlink_flags = 0;
- } else if (strcmp(arg, "permissive") == 0) {
- fw_devlink_flags = DL_FLAG_SYNC_STATE_ONLY;
- } else if (strcmp(arg, "on") == 0) {
- fw_devlink_flags = DL_FLAG_AUTOPROBE_CONSUMER;
- } else if (strcmp(arg, "rpm") == 0) {
- fw_devlink_flags = DL_FLAG_AUTOPROBE_CONSUMER |
- DL_FLAG_PM_RUNTIME;
- }
- return 0;
-}
-early_param("fw_devlink", fw_devlink_setup);
-
-u32 fw_devlink_get_flags(void)
-{
- return fw_devlink_flags;
-}
-
-static bool fw_devlink_is_permissive(void)
-{
- return fw_devlink_flags == DL_FLAG_SYNC_STATE_ONLY;
-}
-
/**
* device_add - add device to device hierarchy.
* @dev: device.
--
2.26.2.761.g0e0b3e54be-goog
next prev parent reply other threads:[~2020-05-15 5:35 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-15 5:34 [PATCH v1 0/4] Optimize fw_devlink parsing Saravana Kannan
2020-05-15 5:34 ` Saravana Kannan [this message]
2020-05-15 5:34 ` [PATCH v1 2/4] driver core: Look for waiting consumers only for a fwnode's primary device Saravana Kannan
2020-05-15 5:34 ` [PATCH v1 3/4] driver core: fw_devlink: Add support for batching fwnode parsing Saravana Kannan
2020-05-15 5:35 ` [PATCH v1 4/4] of: platform: Batch fwnode parsing when adding all top level devices Saravana Kannan
[not found] ` <CGME20200519062510eucas1p27bc59da66e1b77534855103a27f87452@eucas1p2.samsung.com>
2020-05-19 6:25 ` Marek Szyprowski
2020-05-19 6:48 ` Saravana Kannan
2020-05-19 7:11 ` Marek Szyprowski
2020-05-19 10:32 ` Marek Szyprowski
2020-05-19 18:02 ` Saravana Kannan
2020-05-20 4:21 ` Marek Szyprowski
2020-06-17 12:20 ` Geert Uytterhoeven
2020-06-17 18:36 ` Saravana Kannan
2020-06-18 7:31 ` Geert Uytterhoeven
2020-06-18 23:00 ` Saravana Kannan
2020-06-19 12:24 ` Geert Uytterhoeven
2020-06-19 20:07 ` Saravana Kannan
2020-06-20 2:32 ` Saravana Kannan
2020-06-22 15:49 ` Geert Uytterhoeven
2020-06-24 23:22 ` Saravana Kannan
2020-05-15 8:52 ` [PATCH v1 0/4] Optimize fw_devlink parsing Saravana Kannan
2020-05-15 14:36 ` Greg Kroah-Hartman
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=20200515053500.215929-2-saravanak@google.com \
--to=saravanak@google.com \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=ji.luo@nxp.com \
--cc=kernel-team@android.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=robh+dt@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).