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

Use C99 initializers in driver model core

parent d572f1a5
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
#include "base.h" #include "base.h"
struct device device_root = { struct device device_root = {
bus_id: "root", .bus_id = "root",
name: "System root", .name = "System root",
}; };
int (*platform_notify)(struct device * dev) = NULL; int (*platform_notify)(struct device * dev) = NULL;
......
...@@ -56,10 +56,10 @@ bus_attr_store(struct driver_dir_entry * dir, struct attribute * attr, ...@@ -56,10 +56,10 @@ bus_attr_store(struct driver_dir_entry * dir, struct attribute * attr,
} }
static struct driverfs_ops bus_attr_ops = { static struct driverfs_ops bus_attr_ops = {
open: bus_attr_open, .open = bus_attr_open,
close: bus_attr_close, .close = bus_attr_close,
show: bus_attr_show, .show = bus_attr_show,
store: bus_attr_store, .store = bus_attr_store,
}; };
int bus_create_file(struct bus_type * bus, struct bus_attribute * attr) int bus_create_file(struct bus_type * bus, struct bus_attribute * attr)
...@@ -107,8 +107,8 @@ void bus_remove_dir(struct bus_type * bus) ...@@ -107,8 +107,8 @@ void bus_remove_dir(struct bus_type * bus)
} }
static struct driver_dir_entry bus_dir = { static struct driver_dir_entry bus_dir = {
name: "bus", .name = "bus",
mode: (S_IFDIR| S_IRWXU | S_IRUGO | S_IXUGO), .mode = (S_IFDIR| S_IRWXU | S_IRUGO | S_IXUGO),
}; };
static int __init bus_init(void) static int __init bus_init(void)
......
...@@ -67,10 +67,10 @@ dev_attr_store(struct driver_dir_entry * dir, struct attribute * attr, ...@@ -67,10 +67,10 @@ dev_attr_store(struct driver_dir_entry * dir, struct attribute * attr,
} }
static struct driverfs_ops dev_attr_ops = { static struct driverfs_ops dev_attr_ops = {
open: dev_attr_open, .open = dev_attr_open,
close: dev_attr_close, .close = dev_attr_close,
show: dev_attr_show, .show = dev_attr_show,
store: dev_attr_store, .store = dev_attr_store,
}; };
/** /**
...@@ -231,4 +231,3 @@ int device_make_dir(struct device * dev) ...@@ -231,4 +231,3 @@ int device_make_dir(struct device * dev)
EXPORT_SYMBOL(device_create_file); EXPORT_SYMBOL(device_create_file);
EXPORT_SYMBOL(device_remove_file); EXPORT_SYMBOL(device_remove_file);
...@@ -54,10 +54,10 @@ drv_attr_store(struct driver_dir_entry * dir, struct attribute * attr, ...@@ -54,10 +54,10 @@ drv_attr_store(struct driver_dir_entry * dir, struct attribute * attr,
} }
static struct driverfs_ops drv_attr_ops = { static struct driverfs_ops drv_attr_ops = {
open: drv_attr_open, .open = drv_attr_open,
close: drv_attr_close, .close = drv_attr_close,
show: drv_attr_show, .show = drv_attr_show,
store: drv_attr_store, .store = drv_attr_store,
}; };
int driver_create_file(struct device_driver * drv, struct driver_attribute * attr) int driver_create_file(struct device_driver * drv, struct driver_attribute * attr)
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
#include <linux/errno.h> #include <linux/errno.h>
static struct device system_bus = { static struct device system_bus = {
name: "System Bus", .name = "System Bus",
bus_id: "sys", .bus_id = "sys",
}; };
int register_sys_device(struct device * dev) 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