aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/base/core.c4
-rw-r--r--include/linux/device.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 81b78ede37c4..fb8130ceea10 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -400,7 +400,7 @@ static void device_remove_groups(struct device *dev,
400static int device_add_attrs(struct device *dev) 400static int device_add_attrs(struct device *dev)
401{ 401{
402 struct class *class = dev->class; 402 struct class *class = dev->class;
403 struct device_type *type = dev->type; 403 const struct device_type *type = dev->type;
404 int error; 404 int error;
405 405
406 if (class) { 406 if (class) {
@@ -440,7 +440,7 @@ static int device_add_attrs(struct device *dev)
440static void device_remove_attrs(struct device *dev) 440static void device_remove_attrs(struct device *dev)
441{ 441{
442 struct class *class = dev->class; 442 struct class *class = dev->class;
443 struct device_type *type = dev->type; 443 const struct device_type *type = dev->type;
444 444
445 device_remove_groups(dev, dev->groups); 445 device_remove_groups(dev, dev->groups);
446 446
diff --git a/include/linux/device.h b/include/linux/device.h
index d4840511e877..350ceda4de97 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -408,7 +408,7 @@ struct device {
408 408
409 struct kobject kobj; 409 struct kobject kobj;
410 const char *init_name; /* initial name of the device */ 410 const char *init_name; /* initial name of the device */
411 struct device_type *type; 411 const struct device_type *type;
412 412
413 struct mutex mutex; /* mutex to synchronize calls to 413 struct mutex mutex; /* mutex to synchronize calls to
414 * its driver. 414 * its driver.