Skip to content

Commit

Permalink
platform/x86: wmi: declare device_type structure as constant
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
  • Loading branch information
goyalbhumika authored and andy-shev committed Oct 31, 2018
1 parent 0252894 commit 69372c1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/platform/x86/wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 69372c1

Please sign in to comment.