Преглед изворни кода

mmtimer: add member name to the miscdevice declaration

Since the struct miscdevice have many members, it is dangerous to init
it without members name relying only on member order.

This patch add member name to the init declaration.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Corentin Labbe пре 8 година
родитељ
комит
f17c941cbc
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3 3
      drivers/char/mmtimer.c

+ 3 - 3
drivers/char/mmtimer.c

@@ -463,9 +463,9 @@ static int mmtimer_mmap(struct file *file, struct vm_area_struct *vma)
 }
 }
 
 
 static struct miscdevice mmtimer_miscdev = {
 static struct miscdevice mmtimer_miscdev = {
-	SGI_MMTIMER,
-	MMTIMER_NAME,
-	&mmtimer_fops
+	.minor = SGI_MMTIMER,
+	.name = MMTIMER_NAME,
+	.fops = &mmtimer_fops
 };
 };
 
 
 static struct timespec sgi_clock_offset;
 static struct timespec sgi_clock_offset;