From patchwork Thu Oct 17 07:42:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabor Juhos X-Patchwork-Id: 3059281 Return-Path: X-Original-To: patchwork-linux-wireless@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 5E7A9BF924 for ; Thu, 17 Oct 2013 07:43:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 46B15203FB for ; Thu, 17 Oct 2013 07:43:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4134E2039E for ; Thu, 17 Oct 2013 07:43:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752860Ab3JQHmz (ORCPT ); Thu, 17 Oct 2013 03:42:55 -0400 Received: from arrakis.dune.hu ([78.24.191.176]:48762 "EHLO arrakis.dune.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752809Ab3JQHmx (ORCPT ); Thu, 17 Oct 2013 03:42:53 -0400 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 3B944280ADB; Thu, 17 Oct 2013 09:41:32 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from localhost.localdomain (catvpool-576570d8.szarvasnet.hu [87.101.112.216]) by arrakis.dune.hu (Postfix) with ESMTPSA; Thu, 17 Oct 2013 09:41:32 +0200 (CEST) From: Gabor Juhos To: "John W. Linville" Cc: linux-wireless@vger.kernel.org, users@rt2x00.serialmonkey.com, Gabor Juhos Subject: [PATCH 21/21] rt2x00: rt2800pci: use module_pci_driver macro Date: Thu, 17 Oct 2013 09:42:35 +0200 Message-Id: <1381995755-16471-22-git-send-email-juhosg@openwrt.org> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1381995755-16471-1-git-send-email-juhosg@openwrt.org> References: <1381995755-16471-1-git-send-email-juhosg@openwrt.org> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Gabor Juhos --- drivers/net/wireless/rt2x00/rt2800pci.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index 260d2fd..b504455 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c @@ -470,16 +470,4 @@ static struct pci_driver rt2800pci_driver = { .resume = rt2x00pci_resume, }; - -static int __init rt2800pci_init(void) -{ - return pci_register_driver(&rt2800pci_driver); -} - -static void __exit rt2800pci_exit(void) -{ - pci_unregister_driver(&rt2800pci_driver); -} - -module_init(rt2800pci_init); -module_exit(rt2800pci_exit); +module_pci_driver(rt2800pci_driver);