Skip to content

Commit 69372c1

Browse files
goyalbhumikaandy-shev
authored andcommitted
platform/x86: wmi: declare device_type structure as constant
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> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
1 parent 0252894 commit 69372c1

File tree

1 file changed

+3
-3
lines changed
  • drivers/platform/x86

1 file changed

+3
-3
lines changed

drivers/platform/x86/wmi.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -987,19 +987,19 @@ static struct bus_type wmi_bus_type = {
987987
.remove = wmi_dev_remove,
988988
};
989989

990-
static struct device_type wmi_type_event = {
990+
static const struct device_type wmi_type_event = {
991991
.name = "event",
992992
.groups = wmi_event_groups,
993993
.release = wmi_dev_release,
994994
};
995995

996-
static struct device_type wmi_type_method = {
996+
static const struct device_type wmi_type_method = {
997997
.name = "method",
998998
.groups = wmi_method_groups,
999999
.release = wmi_dev_release,
10001000
};
10011001

1002-
static struct device_type wmi_type_data = {
1002+
static const struct device_type wmi_type_data = {
10031003
.name = "data",
10041004
.groups = wmi_data_groups,
10051005
.release = wmi_dev_release,

0 commit comments

Comments
 (0)