From patchwork Wed Oct 10 13:10:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 1573651 X-Patchwork-Delegate: roland@digitalvampire.org Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 17BD7DFB34 for ; Wed, 10 Oct 2012 13:10:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755968Ab2JJNKp (ORCPT ); Wed, 10 Oct 2012 09:10:45 -0400 Received: from mail-qa0-f53.google.com ([209.85.216.53]:42598 "EHLO mail-qa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755832Ab2JJNKo (ORCPT ); Wed, 10 Oct 2012 09:10:44 -0400 Received: by mail-qa0-f53.google.com with SMTP id s11so416978qaa.19 for ; Wed, 10 Oct 2012 06:10:43 -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=N2CNVPwYFTdmzvN0ERiDL2H/dtqlqU5j8BQOZLNZuV8=; b=LUXm+6Iph9FQ4cxlDrkTQwHdZOLTST/BMTdTqfZD+fNYL2tMxVhiV8nrKwFZ8XcYFd QMNq9YjbYJ6OsmmJtcFP3yVxVvox5UrseFdrddC3Iro041zmvkwdzExWwjMSD4QMjUUG z84xY0zg2lsC6DYvIpcxI/RezHX8WihV+hDGSZ7xoPwwUQUq5V4AxO+u9DawdPYCzV7U IOEuZGiAXBPsjRhSTOQVvdkj1PqCvSDxW4RE8tNIX1pMF7HYwjiaBfgCg1wdAfqBQv5w WQXW3M/OQ0zgwOPfeC1/Q1fpYlOTjKgyqoAsGx7axzC5vuXWFdPAgSZvJw2RmEzhsjTI XTwg== MIME-Version: 1.0 Received: by 10.49.85.202 with SMTP id j10mr1618186qez.59.1349874643868; Wed, 10 Oct 2012 06:10:43 -0700 (PDT) Received: by 10.229.146.194 with HTTP; Wed, 10 Oct 2012 06:10:43 -0700 (PDT) Date: Wed, 10 Oct 2012 21:10:43 +0800 Message-ID: Subject: [PATCH] RDMA/amso1100: use module_pci_driver to simplify the code From: Wei Yongjun To: tom@opengridcomputing.com, swise@opengridcomputing.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 From: Wei Yongjun Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun Reviewed-by: Steve WIse --- drivers/infiniband/hw/amso1100/c2.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/amso1100/c2.c b/drivers/infiniband/hw/amso1100/c2.c index 5ce7b9e..9fedb10 100644 --- a/drivers/infiniband/hw/amso1100/c2.c +++ b/drivers/infiniband/hw/amso1100/c2.c @@ -1239,15 +1239,4 @@ static struct pci_driver c2_pci_driver = { .remove = __devexit_p(c2_remove), }; -static int __init c2_init_module(void) -{ - return pci_register_driver(&c2_pci_driver); -} - -static void __exit c2_exit_module(void) -{ - pci_unregister_driver(&c2_pci_driver); -} - -module_init(c2_init_module); -module_exit(c2_exit_module); +module_pci_driver(c2_pci_driver);