Received: by 10.213.65.68 with SMTP id h4csp1164111imn; Wed, 14 Mar 2018 11:28:38 -0700 (PDT) X-Google-Smtp-Source: AG47ELvFm3XbBrxqdzznN+juDDXXM02YKA1Sbvkn4MVzajWqZ0Ik649QJif647w99QhLTLpZhEl0 X-Received: by 10.98.163.143 with SMTP id q15mr5178954pfl.94.1521052118411; Wed, 14 Mar 2018 11:28:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521052118; cv=none; d=google.com; s=arc-20160816; b=qPACHRGn16N8P6lP2n0Tb2qA/AupjgmopKWKxp6rvX7MEizkzxTCJYlW9TiZSgIDZy BgqREL1R9PoDh4lRfM1023fROpAFOyUXp+8FrRDc9KU9AcJtkAWHgAeSPSYcsG399ggJ mVH7lO8iRLOKnEnSeOf945kl6GpcnONJR5G2wGGl+wRJPwISUa1K2eTXrb4PXxIzu4D8 0/jmLh99FKet9Vo4wbsIZNJFQykLcI9aw/zkCDpeG1rD9vwW/iDP1RDrCW2GpZZ5l4n8 Enpx6J+nDXsW/0HTMuieQv8cCIjAXxMOkBEsLjja9fjG70Tk75zGRxSIEFaE6+Pr5JtQ 1y/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=IaqD2tvF8MFGFGsPrQFWYb6u9eMSiuczherbzg6H+OI=; b=BypXh0BEpDP27DV7GlU6XtQ9T8UIcVBcNHTzPqOZ3Zoyl7uu0XWy7LyI+LcTKMqt2z RPfluB1i2iiCimHXlBwrZpO+TrJvzDXYowqrH/sCDe7vwayfcePE7zCLlZFT/mWY+lSV cMAh+CKPWxgwyjLa3DLBZYDaR2FN1Bn+qXO5i/sd3tftKZZsHsX0CzlRI4OsEgIZY5Cq 4tNS8Xjc12Zs3A+dmI32HcI5hFfvS9y0O4y1IQFSJ7u1wVuChRSTvvRqsZgK/uFusxZp gSHFHcELd1VPVcaqVJANDFpadeHLzebnz1nSb5grMsgRkGSbUhMtxVxa6fOCxv5X3kG7 +Tog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z21si2486959pfa.33.2018.03.14.11.28.22; Wed, 14 Mar 2018 11:28:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752279AbeCNSZ4 (ORCPT + 99 others); Wed, 14 Mar 2018 14:25:56 -0400 Received: from mx2.suse.de ([195.135.220.15]:55051 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751739AbeCNSZw (ORCPT ); Wed, 14 Mar 2018 14:25:52 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id E4187AFA3; Wed, 14 Mar 2018 18:25:50 +0000 (UTC) From: Johannes Thumshirn To: Dan Williams , Ross Zwisler Cc: Linux Kernel Mailinglist , Linux NV-DIMM Mailing List , Johannes Thumshirn Subject: [PATCH 3/3] device-dax: use module_nd_driver Date: Wed, 14 Mar 2018 19:25:08 +0100 Message-Id: <20180314182508.10351-4-jthumshirn@suse.de> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180314182508.10351-1-jthumshirn@suse.de> References: <20180314182508.10351-1-jthumshirn@suse.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use module_nd_driver() instead of having module_init() and module_exit() callbacks which just call nd_driver_register() and nd_driver_unregister(). Signed-off-by: Johannes Thumshirn --- drivers/dax/pmem.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/dax/pmem.c b/drivers/dax/pmem.c index 31b6ecce4c64..d927ae82ba0d 100644 --- a/drivers/dax/pmem.c +++ b/drivers/dax/pmem.c @@ -150,17 +150,7 @@ static struct nd_device_driver dax_pmem_driver = { .type = ND_DRIVER_DAX_PMEM, }; -static int __init dax_pmem_init(void) -{ - return nd_driver_register(&dax_pmem_driver); -} -module_init(dax_pmem_init); - -static void __exit dax_pmem_exit(void) -{ - driver_unregister(&dax_pmem_driver.drv); -} -module_exit(dax_pmem_exit); +module_nd_driver(dax_pmem_driver); MODULE_LICENSE("GPL v2"); MODULE_AUTHOR("Intel Corporation"); -- 2.13.6