[dpdk-dev] set eventfd_link_misc.minor=MISC_DYNAMIC_MINOR

Message ID 1438680651-19940-1-git-send-email-xiaobo.chi@nokia.com (mailing list archive)
State Deferred, archived
Headers

Commit Message

chixiaobo Aug. 4, 2015, 9:30 a.m. UTC
  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 <xiaobo.chi@nokia.com>
---
 lib/librte_vhost/eventfd_link/eventfd_link.c | 1 +
 1 file changed, 1 insertion(+)
  

Patch

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,
 };