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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
695cca8763
commit
aed65af1cc
@@ -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.
|
||||
|
Reference in New Issue
Block a user