From: Bhumika Goyal <bhumirks@gmail.com>
To: dvhart@infradead.org, andy@infradead.org,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: julia.lawall@lip6.fr, Bhumika Goyal <bhumirks@gmail.com>
Subject: [PATCH] platform/x86: wmi: declare device_type structure as constant
Date: Sun, 28 Oct 2018 11:37:00 +0530 [thread overview]
Message-ID: <20181028060700.22110-1-bhumirks@gmail.com> (raw)
The only usage of device_type structure is getting stored as
a reference in the type field of device structure. This type
field is declared const. Therefore, the device_type structure
can never be modified and can be declared as const.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
drivers/platform/x86/wmi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index 04791ea5d97b..bea35be68706 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -987,19 +987,19 @@ static struct bus_type wmi_bus_type = {
.remove = wmi_dev_remove,
};
-static struct device_type wmi_type_event = {
+static const struct device_type wmi_type_event = {
.name = "event",
.groups = wmi_event_groups,
.release = wmi_dev_release,
};
-static struct device_type wmi_type_method = {
+static const struct device_type wmi_type_method = {
.name = "method",
.groups = wmi_method_groups,
.release = wmi_dev_release,
};
-static struct device_type wmi_type_data = {
+static const struct device_type wmi_type_data = {
.name = "data",
.groups = wmi_data_groups,
.release = wmi_dev_release,
--
2.14.5
next reply other threads:[~2018-10-28 6:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-28 6:07 Bhumika Goyal [this message]
2018-10-29 13:49 ` [PATCH] platform/x86: wmi: declare device_type structure as constant Andy Shevchenko
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=20181028060700.22110-1-bhumirks@gmail.com \
--to=bhumirks@gmail.com \
--cc=andy@infradead.org \
--cc=dvhart@infradead.org \
--cc=julia.lawall@lip6.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.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