set eventfd_link_misc.minor=MISC_DYNAMIC_MINOR
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.
Signed-off-by chixiaobo <[email protected]>
--- lib/librte_vhost/eventfd_link/eventfd_link.c | 1 + 1 file changed, 1 insertion(+)
lib/librte_vhost/eventfd_link/eventfd_link.c +1 -0
@@ -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