DORMANTno replies

[PATCH] set eventfd_link_misc.minor=MISC_DYNAMIC_MINOR

From: chixiaobo <hidden>
Date: 2015-08-04 09:31:49
Subsystem: library code, the rest · Maintainers: Andrew Morton, Linus Torvalds

For miscdevices, the major device_no is same, so the minor device_no should be set to ditinguish different misc devices;  if not set the minor, it may fail while insmod due to the default minor value, 0, has been used by other miscdevice. MISC_DYNAMIC_MINOR means to let Linux kernel dynamically assign one minor devide number while loading.

Signed-off-by: chixiaobo <redacted>
---
 lib/librte_vhost/eventfd_link/eventfd_link.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/lib/librte_vhost/eventfd_link/eventfd_link.c b/lib/librte_vhost/eventfd_link/eventfd_link.c
index 62c45c8..b023cdf 100644
--- a/lib/librte_vhost/eventfd_link/eventfd_link.c
+++ b/lib/librte_vhost/eventfd_link/eventfd_link.c
@@ -169,6 +169,7 @@ static const struct file_operations eventfd_link_fops = {
 
 
 static struct miscdevice eventfd_link_misc = {
+	.minor = MISC_DYNAMIC_MINOR,
 	.name = "eventfd-link",
 	.fops = &eventfd_link_fops,
 };
-- 
1.9.4.msysgit.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help