Commit 3a245026 authored by Patrick Mochel's avatar Patrick Mochel

Use C99 initializers in driver model core

parent d572f1a5
......@@ -16,8 +16,8 @@
#include "base.h"
struct device device_root = {
bus_id: "root",
name: "System root",
.bus_id = "root",
.name = "System root",
};
int (*platform_notify)(struct device * dev) = NULL;
......
......@@ -56,10 +56,10 @@ bus_attr_store(struct driver_dir_entry * dir, struct attribute * attr,
}
static struct driverfs_ops bus_attr_ops = {
open: bus_attr_open,
close: bus_attr_close,
show: bus_attr_show,
store: bus_attr_store,
.open = bus_attr_open,
.close = bus_attr_close,
.show = bus_attr_show,
.store = bus_attr_store,
};
int bus_create_file(struct bus_type * bus, struct bus_attribute * attr)
......@@ -107,8 +107,8 @@ void bus_remove_dir(struct bus_type * bus)
}
static struct driver_dir_entry bus_dir = {
name: "bus",
mode: (S_IFDIR| S_IRWXU | S_IRUGO | S_IXUGO),
.name = "bus",
.mode = (S_IFDIR| S_IRWXU | S_IRUGO | S_IXUGO),
};
static int __init bus_init(void)
......
......@@ -67,10 +67,10 @@ dev_attr_store(struct driver_dir_entry * dir, struct attribute * attr,
}
static struct driverfs_ops dev_attr_ops = {
open: dev_attr_open,
close: dev_attr_close,
show: dev_attr_show,
store: dev_attr_store,
.open = dev_attr_open,
.close = dev_attr_close,
.show = dev_attr_show,
.store = dev_attr_store,
};
/**
......@@ -231,4 +231,3 @@ int device_make_dir(struct device * dev)
EXPORT_SYMBOL(device_create_file);
EXPORT_SYMBOL(device_remove_file);
......@@ -54,10 +54,10 @@ drv_attr_store(struct driver_dir_entry * dir, struct attribute * attr,
}
static struct driverfs_ops drv_attr_ops = {
open: drv_attr_open,
close: drv_attr_close,
show: drv_attr_show,
store: drv_attr_store,
.open = drv_attr_open,
.close = drv_attr_close,
.show = drv_attr_show,
.store = drv_attr_store,
};
int driver_create_file(struct device_driver * drv, struct driver_attribute * attr)
......
......@@ -17,8 +17,8 @@
#include <linux/errno.h>
static struct device system_bus = {
name: "System Bus",
bus_id: "sys",
.name = "System Bus",
.bus_id = "sys",
};
int register_sys_device(struct device * dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment