Skip to contentSkip to conversation

set eventfd_link_misc.minor=MISC_DYNAMIC_MINOR

PATCH New chixiaobo 1 participant 1 message Aug 4, 2015

lore
Share & tools
lore

chixiaobo

author
#0 lore raw

PATCH 1/1 set eventfd_link_misc.minor=MISC_DYNAMIC_MINOR

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.

---
 lib/librte_vhost/eventfd_link/eventfd_link.c | 1 +
 1 file changed, 1 insertion(+)
lib/librte_vhost/eventfd_link/eventfd_link.c +1 -0
index 62c45c8..b023cdf 100644
@@ -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,
 };
Signature · 1 line
1.9.4.msysgit.2