summaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorStephen Hemminger2011-03-28 18:12:52 +0200
committerGreg Kroah-Hartman2011-04-20 01:45:51 +0200
commitaed65af1cc2f6fc9ded5a8158f1405a02cf6d2ff (patch)
treefd7051c0d25a6f463db9593a981ca3e558d17b4f /include/linux/device.h
parentfirmware: Fix grammar in sysfs-firmware-dmi doc (diff)
downloadkernel-qcow2-linux-aed65af1cc2f6fc9ded5a8158f1405a02cf6d2ff.tar.gz
kernel-qcow2-linux-aed65af1cc2f6fc9ded5a8158f1405a02cf6d2ff.tar.xz
kernel-qcow2-linux-aed65af1cc2f6fc9ded5a8158f1405a02cf6d2ff.zip
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 'include/linux/device.h')
-rw-r--r--include/linux/device.h2
1 files changed, 1 insertions, 1 deletions
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 {
struct kobject kobj;
const char *init_name; /* initial name of the device */
- struct device_type *type;
+ const struct device_type *type;
struct mutex mutex; /* mutex to synchronize calls to
* its driver.