Commit bfe224e3 authored by Randy Dunlap's avatar Randy Dunlap Committed by Linus Torvalds

[PATCH] IPMI: use C99 struct inits.

Convert IPMI driver struct usage to C99 initializers.
Signed-off-by: default avatarRandy Dunlap <rddunlap@osdl.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6f038511
...@@ -3038,9 +3038,9 @@ static int panic_event(struct notifier_block *this, ...@@ -3038,9 +3038,9 @@ static int panic_event(struct notifier_block *this,
} }
static struct notifier_block panic_block = { static struct notifier_block panic_block = {
panic_event, .notifier_call = panic_event,
NULL, .next = NULL,
200 /* priority: INT_MAX >= x >= 0 */ .priority = 200 /* priority: INT_MAX >= x >= 0 */
}; };
static int ipmi_init_msghandler(void) static int ipmi_init_msghandler(void)
......
...@@ -381,11 +381,17 @@ struct poweroff_function { ...@@ -381,11 +381,17 @@ struct poweroff_function {
}; };
static struct poweroff_function poweroff_functions[] = { static struct poweroff_function poweroff_functions[] = {
{ "ATCA", ipmi_atca_detect, ipmi_poweroff_atca }, { .platform_type = "ATCA",
{ "CPI1", ipmi_cpi1_detect, ipmi_poweroff_cpi1 }, .detect = ipmi_atca_detect,
.poweroff_func = ipmi_poweroff_atca },
{ .platform_type = "CPI1",
.detect = ipmi_cpi1_detect,
.poweroff_func = ipmi_poweroff_cpi1 },
/* Chassis should generally be last, other things should override /* Chassis should generally be last, other things should override
it. */ it. */
{ "chassis", ipmi_chassis_detect, ipmi_poweroff_chassis }, { .platform_type = "chassis",
.detect = ipmi_chassis_detect,
.poweroff_func = ipmi_poweroff_chassis },
}; };
#define NUM_PO_FUNCS (sizeof(poweroff_functions) \ #define NUM_PO_FUNCS (sizeof(poweroff_functions) \
/ sizeof(struct poweroff_function)) / sizeof(struct poweroff_function))
......
...@@ -504,9 +504,9 @@ static void panic_halt_ipmi_heartbeat(void) ...@@ -504,9 +504,9 @@ static void panic_halt_ipmi_heartbeat(void)
static struct watchdog_info ident= static struct watchdog_info ident=
{ {
0, /* WDIOF_SETTIMEOUT, */ .options = 0, /* WDIOF_SETTIMEOUT, */
1, .firmware_version = 1,
"IPMI" .identity = "IPMI"
}; };
static int ipmi_ioctl(struct inode *inode, struct file *file, static int ipmi_ioctl(struct inode *inode, struct file *file,
...@@ -734,9 +734,9 @@ static struct file_operations ipmi_wdog_fops = { ...@@ -734,9 +734,9 @@ static struct file_operations ipmi_wdog_fops = {
}; };
static struct miscdevice ipmi_wdog_miscdev = { static struct miscdevice ipmi_wdog_miscdev = {
WATCHDOG_MINOR, .minor = WATCHDOG_MINOR,
"watchdog", .name = "watchdog",
&ipmi_wdog_fops .fops = &ipmi_wdog_fops
}; };
static DECLARE_RWSEM(register_sem); static DECLARE_RWSEM(register_sem);
...@@ -871,9 +871,9 @@ static int wdog_reboot_handler(struct notifier_block *this, ...@@ -871,9 +871,9 @@ static int wdog_reboot_handler(struct notifier_block *this,
} }
static struct notifier_block wdog_reboot_notifier = { static struct notifier_block wdog_reboot_notifier = {
wdog_reboot_handler, .notifier_call = wdog_reboot_handler,
NULL, .next = NULL,
0 .priority = 0
}; };
static int wdog_panic_handler(struct notifier_block *this, static int wdog_panic_handler(struct notifier_block *this,
...@@ -899,9 +899,9 @@ static int wdog_panic_handler(struct notifier_block *this, ...@@ -899,9 +899,9 @@ static int wdog_panic_handler(struct notifier_block *this,
} }
static struct notifier_block wdog_panic_notifier = { static struct notifier_block wdog_panic_notifier = {
wdog_panic_handler, .notifier_call = wdog_panic_handler,
NULL, .next = NULL,
150 /* priority: INT_MAX >= x >= 0 */ .priority = 150 /* priority: INT_MAX >= x >= 0 */
}; };
......
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