}
static struct device *
-macvlan_create(const char *name, struct blob_attr *attr)
+macvlan_create(const char *name, struct device_type *devtype,
+ struct blob_attr *attr)
{
struct macvlan_device *mvdev;
struct device *dev = NULL;
return NULL;
dev = &mvdev->dev;
- device_init(dev, &macvlan_device_type, name);
+ device_init(dev, devtype, name);
dev->config_pending = true;
mvdev->set_state = dev->set_state;
return dev;
}
-const struct device_type macvlan_device_type = {
+static struct device_type macvlan_device_type = {
.name = "MAC VLAN",
.config_params = &macvlan_attr_list,
.create = macvlan_create,
.free = macvlan_free,
.dump_info = macvlan_dump_info,
};
+
+static void __init macvlan_device_type_init(void)
+{
+ device_type_add(&macvlan_device_type);
+}