From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from demumfd002.nsn-inter.net (demumfd002.nsn-inter.net [93.183.12.31]) by dpdk.org (Postfix) with ESMTP id 54091C332 for ; Tue, 4 Aug 2015 11:31:49 +0200 (CEST) Received: from demuprx017.emea.nsn-intra.net ([10.150.129.56]) by demumfd002.nsn-inter.net (8.15.1/8.15.1) with ESMTPS id t749VmKg018412 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 4 Aug 2015 09:31:49 GMT Received: from localhost ([10.140.178.105]) by demuprx017.emea.nsn-intra.net (8.12.11.20060308/8.12.11) with ESMTP id t749Vltm011118; Tue, 4 Aug 2015 11:31:48 +0200 From: chixiaobo To: dev@dpdk.org Date: Tue, 4 Aug 2015 17:31:47 +0800 Message-Id: <1438680707-16968-1-git-send-email-xiaobo.chi@nokia.com> X-Mailer: git-send-email 1.9.4.msysgit.2 X-purgate-type: clean X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: clean X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate-size: 981 X-purgate-ID: 151667::1438680709-000063FD-FA70C174/0/0 Cc: chixiaobo Subject: [dpdk-dev] [PATCH] set eventfd_link_misc.minor=MISC_DYNAMIC_MINOR X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Aug 2015 09:31:49 -0000 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 --- 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