irda: irnet: add member name to the miscdevice declaration
authorLABBE Corentin <clabbe.montjoie@gmail.com>
Thu, 15 Dec 2016 10:42:50 +0000 (11:42 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 17 Dec 2016 16:29:31 +0000 (11:29 -0500)
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: David S. Miller <davem@davemloft.net>
net/irda/irnet/irnet_ppp.h

index ec092c9bdf3ccf73b363fb65995f1b05fb586cbf..32061442cc8e935bb18785b66db75411874dd5f2 100644 (file)
@@ -108,9 +108,9 @@ static const struct file_operations irnet_device_fops =
 /* Structure so that the misc major (drivers/char/misc.c) take care of us... */
 static struct miscdevice irnet_misc_device =
 {
-       IRNET_MINOR,
-       "irnet",
-       &irnet_device_fops
+       .minor = IRNET_MINOR,
+       .name = "irnet",
+       .fops = &irnet_device_fops
 };
 
 #endif /* IRNET_PPP_H */