From patchwork Tue Apr 25 03:14:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9697479 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8E870603F2 for ; Tue, 25 Apr 2017 03:14:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A5522815E for ; Tue, 25 Apr 2017 03:14:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7DC5D28438; Tue, 25 Apr 2017 03:14:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 203842815E for ; Tue, 25 Apr 2017 03:14:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S980214AbdDYDOP (ORCPT ); Mon, 24 Apr 2017 23:14:15 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:34719 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S980207AbdDYDOO (ORCPT ); Mon, 24 Apr 2017 23:14:14 -0400 Received: by mail-pg0-f67.google.com with SMTP id t7so4431203pgt.1 for ; Mon, 24 Apr 2017 20:14:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=k1JtLpORzzckHWjD78KibpMn2FMSlJKlp+UopIQnoPY=; b=tobGe0vEagh1O3vyvU8KDy8shHzggMWNVmSYTCDYa3R4+N+5k8gRFRJg48QmsEdgo4 UlCHHUw/ktehoD4bWz2evuL2M7+6jsBSW3jAOdQQN7+NMmbMx/msNY3Z50JOO6Fz6L/P tZQosz2aUxTb32632Pm2IZleRwWgaBL9vzPOyphROlfeWj+tnF93upJ1B/+Blw88xR4e C8zDRoXgwvcx5KmXLixkrUw8uHDo/n/hDEIL25P/XGzqE3MWa/GZuQ8ybU1SM31kNK1f gBFNacb0chTd0HXL+3BMix9p5lm+JRZ4MJh56XWdTfAYWCvYhfuuhq9qpvjEhIEFL9PU /vXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=k1JtLpORzzckHWjD78KibpMn2FMSlJKlp+UopIQnoPY=; b=fUohngvel1ohXwUlVviMtMJv1z4oobGqvxbk+cLQCZNbhRKo506dQGpN+BV/NSoOYy Rv4WK8rS4aobLU/FFHTvIaMdgIFTXXokXk1HV5EFt55dkxOXDy8myxaH6uOehH0ynjfP TwXeIrd/r5mgOEqP8DmX9t9rU3DtkT4TqU2cCf3pYHWKy1D5YKkO7JxSc+GhTYzRf0VR MJyIECDZPZ5P98OBrF8SMRh0pL6gwv4PtLYs16+bgZX03cyR6mHF1KPIHPkcJhs4VUDt zT4bMpbQvIpy2+mlgldg+g2sia6UbuUmdQU00U4RVcUD62PKrsiwBzDHNcqUCKiAq/oZ dEPA== X-Gm-Message-State: AN3rC/4l5eG7Vg2iTEynQDaEu7rFJ5bwJgsX+hVcBmp70u5kBNRjvsms 7hXJXFtB3L7+5w== X-Received: by 10.98.17.204 with SMTP id 73mr27819160pfr.267.1493090054144; Mon, 24 Apr 2017 20:14:14 -0700 (PDT) Received: from localhost.localdomain.localdomain (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id c77sm25969665pfe.37.2017.04.24.20.14.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Apr 2017 20:14:13 -0700 (PDT) From: Wei Yongjun To: Jan Glauber , David Daney , "Steven J. Hill" , Ulf Hansson Cc: Wei Yongjun , linux-mmc@vger.kernel.org Subject: [PATCH -next] mmc: cavium: Use module_pci_driver to simplify the code Date: Tue, 25 Apr 2017 03:14:09 +0000 Message-Id: <20170425031409.9822-1-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.9.3 MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.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 Acked-by: Jan Glauber --- drivers/mmc/host/cavium-thunderx.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" 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/mmc/host/cavium-thunderx.c b/drivers/mmc/host/cavium-thunderx.c index 65244e8..fe3d772 100644 --- a/drivers/mmc/host/cavium-thunderx.c +++ b/drivers/mmc/host/cavium-thunderx.c @@ -179,18 +179,7 @@ static struct pci_driver thunder_mmc_driver = { .remove = thunder_mmc_remove, }; -static int __init thunder_mmc_init_module(void) -{ - return pci_register_driver(&thunder_mmc_driver); -} - -static void __exit thunder_mmc_exit_module(void) -{ - pci_unregister_driver(&thunder_mmc_driver); -} - -module_init(thunder_mmc_init_module); -module_exit(thunder_mmc_exit_module); +module_pci_driver(thunder_mmc_driver); MODULE_AUTHOR("Cavium Inc."); MODULE_DESCRIPTION("Cavium ThunderX eMMC Driver");