From patchwork Wed Jul 17 01:56:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2828391 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D6FEFC0AB2 for ; Wed, 17 Jul 2013 01:56:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E43F62021C for ; Wed, 17 Jul 2013 01:56:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EC5792021A for ; Wed, 17 Jul 2013 01:56:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751371Ab3GQB4o (ORCPT ); Tue, 16 Jul 2013 21:56:44 -0400 Received: from mail-bk0-f46.google.com ([209.85.214.46]:47886 "EHLO mail-bk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751179Ab3GQB4m (ORCPT ); Tue, 16 Jul 2013 21:56:42 -0400 Received: by mail-bk0-f46.google.com with SMTP id na10so511185bkb.5 for ; Tue, 16 Jul 2013 18:56:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=xu9kYr3BQ9y0MsZmLHBMEZvk4uPSvHQv/L0tt4hQ5Ic=; b=jfXrbiPzUBrA+pkalnvrdHVTYYKvPtC7S0d0w1IX69ZswFs0Ld5FjxQjJvnoDio9vn nL9EWpsCYaWApkAAaA28cmtf8Wznyta2cxTcwjGnhoQlYfUULVxFwMNaRfX9o7ONt0k2 w64WyQjdpPK1o/jcDrFbZTBQGMChjpwXq230ey8RZV8CBhR821fXZ65aY89HImrRJxAX X1dbehjYARMswnWYtHVG35mlceNskMbVbfRH/1Dhmm1LOL86gppZGFUzfkv71/7+EWuo /tfrC/jaNN4kNTrP75Vw4QHemk6mp5vXUSoMCF8HNXSp5M7MDwPknOarQkU8FQNxSs0h h2zw== MIME-Version: 1.0 X-Received: by 10.204.229.7 with SMTP id jg7mr643191bkb.58.1374026201475; Tue, 16 Jul 2013 18:56:41 -0700 (PDT) Received: by 10.205.122.72 with HTTP; Tue, 16 Jul 2013 18:56:41 -0700 (PDT) Date: Wed, 17 Jul 2013 09:56:41 +0800 Message-ID: Subject: [PATCH -next] IB/mlx5: use module_pci_driver to simplify the code From: Wei Yongjun To: eli@mellanox.com, roland@kernel.org, sean.hefty@intel.com, hal.rosenstock@gmail.com Cc: yongjun_wei@trendmicro.com.cn, linux-rdma@vger.kernel.org Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 From: Wei Yongjun Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Wei Yongjun --- drivers/infiniband/hw/mlx5/main.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index 8000fff..0cdc185 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -1490,15 +1490,4 @@ static struct pci_driver mlx5_ib_driver = { .remove = remove_one }; -static int __init mlx5_ib_init(void) -{ - return pci_register_driver(&mlx5_ib_driver); -} - -static void __exit mlx5_ib_cleanup(void) -{ - pci_unregister_driver(&mlx5_ib_driver); -} - -module_init(mlx5_ib_init); -module_exit(mlx5_ib_cleanup); +module_pci_driver(mlx5_ib_driver);