Received: by 10.213.65.68 with SMTP id h4csp1163823imn; Wed, 14 Mar 2018 11:28:06 -0700 (PDT) X-Google-Smtp-Source: AG47ELuHtbgQvxm8B4fCKm2yswgqlWpLtd/4kKlSbos4Z2sBtxH6cyuso1W0NW263tz87/pfkyTv X-Received: by 2002:a17:902:64cf:: with SMTP id y15-v6mr5038683pli.49.1521052086795; Wed, 14 Mar 2018 11:28:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521052086; cv=none; d=google.com; s=arc-20160816; b=SvFvoQBTEJWc9RXmQQeANsVMPbekWtWRB4B8HXqfQrXLPySEpmEQZgJq3OWn9rJTew zMfT1v8944CBuD0tDfxwM1LDNK/TtsCyCSFhxrEx5/boLegaT5WPGxR9K0eLEyJmtjav dUocDh+uwFRMGdtNc/SmNXrg6IJfYnrOZ3CsBYy+8tA68BYesOZ4j7b5uTZYmrq+YavI FfVHZ3FwOUB2kZmLqv93yg4f+JV8qks9gmGwEnHB8gVSjQ9GnNjCC8ld60skICdaR+2R q65qiy++DX2ZvOdK2I4ZSKJ6nDYR7Z1G065FLH73eZP7+tiNGyndFEd6dvPDjiSWvhYC rYkQ== 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=aOEYnxtB85J6tZbLP0MsWuVvM1pVwPU2dDtxWl8ynTQ=; b=iOPsLkSH6lc7ZfOKBRgNZPOXklQpANdPkWJKywovONtPwWN/45+35c2lq8/iVJVvGx BLpxwYyDbymqb+CkbmP5aghxLEpytxH55ZETABky7YCbd8Z/W2jnqFlglhwZ36KPMwKw UGdkctqDhU1TanR7Iz7xvKOB6N52ALWbgDSMnBMjpEIEA6KN31flCUApGgL735T9thGU q+DjZDhdw6vfeCZsGA5kSuClV/tisH15/PWfBFOSIozsf605bl9aetHlH9QU6zAaTjgE BxkyhHfxVDvjYiuAiz8idRn1U9JotN/k+uY8BCEl0qdnRbRK5rgUdx78q0tTrFzRLO0E /xpg== 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 w9si2194406pgr.329.2018.03.14.11.27.52; Wed, 14 Mar 2018 11:28:06 -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 S1752242AbeCNSZz (ORCPT + 99 others); Wed, 14 Mar 2018 14:25:55 -0400 Received: from mx2.suse.de ([195.135.220.15]:55042 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751727AbeCNSZv (ORCPT ); Wed, 14 Mar 2018 14:25:51 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id A1659AFA5; 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 2/3] libnvdimm, pmem: use module_nd_driver Date: Wed, 14 Mar 2018 19:25:07 +0100 Message-Id: <20180314182508.10351-3-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/nvdimm/pmem.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c index 06f8dcc52ca6..d8ab882be790 100644 --- a/drivers/nvdimm/pmem.c +++ b/drivers/nvdimm/pmem.c @@ -547,17 +547,7 @@ static struct nd_device_driver nd_pmem_driver = { .type = ND_DRIVER_NAMESPACE_IO | ND_DRIVER_NAMESPACE_PMEM, }; -static int __init pmem_init(void) -{ - return nd_driver_register(&nd_pmem_driver); -} -module_init(pmem_init); - -static void pmem_exit(void) -{ - driver_unregister(&nd_pmem_driver.drv); -} -module_exit(pmem_exit); +module_nd_driver(nd_pmem_driver); MODULE_AUTHOR("Ross Zwisler "); MODULE_LICENSE("GPL v2"); -- 2.13.6