aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2011-03-28 12:12:52 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-04-19 19:45:51 -0400
commitaed65af1cc2f6fc9ded5a8158f1405a02cf6d2ff (patch)
treefd7051c0d25a6f463db9593a981ca3e558d17b4f /drivers/base
parent695cca8763078c743417886e80af8ccb78bec9f2 (diff)
drivers: make device_type const
The device_type structure does not contain data that changes during usage and should be const. This allows devices to declare the struct const. I have patches to change all the subsystems, but need the infra structure change first. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/core.c4
1 files changed, 2 insertions, 2 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