Instead of using positional initialization, use the more modern
designated initializer style, as already used for 'crash_fops'.
This makes the member initialization not only less ambiguous but also
allows structure layout randomization of the underlying type (as done in
grsecurity).
Signed-off-by: Mathias Krause <minipli(a)grsecurity.net>
---
memory_driver/crash.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/memory_driver/crash.c b/memory_driver/crash.c
index 81bd0e5c1aec..4999ed4113b7 100644
--- a/memory_driver/crash.c
+++ b/memory_driver/crash.c
@@ -324,9 +324,9 @@ static struct file_operations crash_fops = {
};
static struct miscdevice crash_dev = {
- MISC_DYNAMIC_MINOR,
- "crash",
- &crash_fops
+ .minor = MISC_DYNAMIC_MINOR,
+ .name = "crash",
+ .fops = &crash_fops
};
static int __init
--
2.30.2