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>
static int device_add_attrs(struct device *dev)
{
struct class *class = dev->class;
- struct device_type *type = dev->type;
+ const struct device_type *type = dev->type;
int error;
if (class) {
static void device_remove_attrs(struct device *dev)
{
struct class *class = dev->class;
- struct device_type *type = dev->type;
+ const struct device_type *type = dev->type;
device_remove_groups(dev, dev->groups);
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.