From patchwork Fri Sep 18 13:25:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 7216281 Return-Path: X-Original-To: patchwork-linux-nvdimm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 51FE1BEEC1 for ; Fri, 18 Sep 2015 13:25:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 80563206F4 for ; Fri, 18 Sep 2015 13:25:15 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 70F97206B7 for ; Fri, 18 Sep 2015 13:25:14 +0000 (UTC) Received: from ml01.vlan14.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 5F9236112B; Fri, 18 Sep 2015 06:25:14 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D04F961125 for ; Fri, 18 Sep 2015 06:25:12 -0700 (PDT) Received: by pacfv12 with SMTP id fv12so52354955pac.2 for ; Fri, 18 Sep 2015 06:25:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:content-type :mime-version:content-transfer-encoding; bh=bjkKva2VEcYESNTJ5ErwQaS4KsQrj7V4IA1HelFs4/M=; b=gKnJ35EG7n548izliOm7bMjwLXZwlsnnM97TghVudwyzDmEW75fjEXYFcBBHKh74/o TAZFJ3aQCcpj5lgHDQ46gn6PLeuKdMmj+H+BUo/2pGRseGRz+YCMlmktFXnNOLHL/Huj 2v/WrSgC9fQtY+/0i63Kj+UKCibItC+pR9WOxODuUYn1jMat4HbIrJ4UD85gOK86VEI7 /O5vkr109k7q8Y0STLbrfPn4lxs50IPnKQb9fNGwcbvqhJyOVKZEUJp7a0IL5iSUjmph qu6aoMl4tMoLtgeZlDXpw+bp0D5K/3Gdg746DuzXsfLyfqTQFnMRg6wWAq1jNw2q3O5b I7VQ== X-Gm-Message-State: ALoCoQn0IVU76ep+RI+Fu66mxaGLMl+YqAs1/3wWQ+YeOZ42T7qTUxe5QQFrZXVG86LOWdQt7w39 X-Received: by 10.66.251.136 with SMTP id zk8mr7339865pac.143.1442582712547; Fri, 18 Sep 2015 06:25:12 -0700 (PDT) Received: from phoenix (118-171-143-125.dynamic.hinet.net. [118.171.143.125]) by smtp.gmail.com with ESMTPSA id dh1sm9131794pbd.49.2015.09.18.06.25.10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Sep 2015 06:25:11 -0700 (PDT) Message-ID: <1442582708.30083.1.camel@ingics.com> Subject: [PATCH] libnvdimm: e820: Convert to module_platform_driver From: Axel Lin To: Dan Williams Date: Fri, 18 Sep 2015 21:25:08 +0800 X-Mailer: Evolution 3.12.11-0ubuntu3 Mime-Version: 1.0 Cc: linux-nvdimm@lists.01.org X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_SORBS_WEB, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use module_platform_driver to simplify the code. Signed-off-by: Axel Lin --- drivers/nvdimm/e820.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/nvdimm/e820.c b/drivers/nvdimm/e820.c index 8282db2..fb38836 100644 --- a/drivers/nvdimm/e820.c +++ b/drivers/nvdimm/e820.c @@ -70,18 +70,8 @@ static struct platform_driver e820_pmem_driver = { }, }; -static __init int e820_pmem_init(void) -{ - return platform_driver_register(&e820_pmem_driver); -} - -static __exit void e820_pmem_exit(void) -{ - platform_driver_unregister(&e820_pmem_driver); -} +module_platform_driver(e820_pmem_driver); MODULE_ALIAS("platform:e820_pmem*"); MODULE_LICENSE("GPL v2"); MODULE_AUTHOR("Intel Corporation"); -module_init(e820_pmem_init); -module_exit(e820_pmem_exit);