Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1715591 > unrolled thread

[PATCH 10/15] platform/x86: wmi: make device_type const

Started byBhumika Goyal <bhumirks@gmail.com>
First post2017-08-19 10:30 +0200
Last post2017-08-19 10:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 10/15] platform/x86: wmi: make device_type const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-19 10:30 +0200

#1715591 — [PATCH 10/15] platform/x86: wmi: make device_type const

FromBhumika Goyal <bhumirks@gmail.com>
Date2017-08-19 10:30 +0200
Subject[PATCH 10/15] platform/x86: wmi: make device_type const
Message-ID<ug7iN-7kG-9@gated-at.bofh.it>
Make these const as they are only stored in the type field of a device
structure, which is const.
Done using Coccinelle.

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 e32ba57..a37c253 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -810,19 +810,19 @@ static int wmi_dev_remove(struct device *dev)
 	.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,
-- 
1.9.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web