Received: by 10.223.176.5 with SMTP id f5csp1072762wra; Fri, 2 Feb 2018 10:41:52 -0800 (PST) X-Google-Smtp-Source: AH8x226whgFPvb9E8AfCBGsfmYUuiTrbL7wNPoPmHf367acJoEMtJGfPP6305Uoj7k6LysaR9I9Q X-Received: by 10.101.80.202 with SMTP id s10mr2488509pgp.226.1517596912283; Fri, 02 Feb 2018 10:41:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517596912; cv=none; d=google.com; s=arc-20160816; b=pvhx8aiUu1usS+QaiprwAxBYgwnsZ8D3Ns+oh6q+877c/NEc/TgWnD8NzGeAcsEn1d Pv41l8xjPC3peBL6/HnR1DBXfXP4a+3Wr/l1PoW/FqkvwToicWySM3UX8LBMjmqV7tbZ 2qsGWmXrX+kqM7kJHg2y/GLE0Yf7I/wwdhAlJEl7gyFW1JGmMXkEXWuDXxtq+Y1fbMxr s+5gD6ye2FS++fxY/X+KaXX+NSiVE+mCT/Jek3F9SsuKGRGoaC8qiYtFT5r9WMsSzt5r dnbgqic2DZiTELgpxN9wGsI/NL1ARqNLrU/0m75Kva+AD/y6ZYXxF1UczWLUkKl+WSSF 2esA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=tgpqEWbjvYcS/uyjxr7gppEVunuv8H90zFQ/c7cfctg=; b=dXY4JehTGgNko4O9QFPVVYKhXBJV7P12NNqHg2Ce0v8JNPrIh5Rm259V1eNK6u2jKF mFNsOU7blz2Ms5OVdsANXgBve4dQA36cM11Q3yPyma+5TAnyhqf3PG+TGIJ9CxgYdn7u 5f3ffhd2g59+u78vb/q6PkdCgvj/+NNA0NFSVruFWFrqIXHTjf7dPuO9JeRaIXe5Jzuf TX+R2mPG5+JgdFcLvxzJHoUCg/W8FT/qCVboCrVVI5nGwxsYn2Ydn1nUn8gJjBBYZCPZ VTkj4YL/wlkbm4WzdqPRSw99rPn0nAJshw/l6kirEtUr6Fon5r752Cxn23wOupKKLR+3 Wlhw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g6si20815pgs.673.2018.02.02.10.41.37; Fri, 02 Feb 2018 10:41:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932074AbeBBSko (ORCPT + 99 others); Fri, 2 Feb 2018 13:40:44 -0500 Received: from mga12.intel.com ([192.55.52.136]:16744 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755041AbeBBSkB (ORCPT ); Fri, 2 Feb 2018 13:40:01 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Feb 2018 10:40:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,450,1511856000"; d="scan'208";a="15023297" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga008.fm.intel.com with ESMTP; 02 Feb 2018 10:39:59 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id A45E8483; Fri, 2 Feb 2018 20:39:56 +0200 (EET) From: Andy Shevchenko To: Sudip Mukherjee , linux-kernel@vger.kernel.org, Nikola Ciprich Cc: Andy Shevchenko Subject: [PATCH v1 6/8] parport: Switch to use module_pci_driver() macro Date: Fri, 2 Feb 2018 20:39:53 +0200 Message-Id: <20180202183955.85453-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180202183955.85453-1-andriy.shevchenko@linux.intel.com> References: <20180202183955.85453-1-andriy.shevchenko@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Eliminate some boilerplate code by using module_pci_driver() instead of init/exit, moving the salient bits from init into probe. Signed-off-by: Andy Shevchenko --- drivers/parport/parport_serial.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/parport/parport_serial.c b/drivers/parport/parport_serial.c index e30b1a1d769d..be28cc1fa37e 100644 --- a/drivers/parport/parport_serial.c +++ b/drivers/parport/parport_serial.c @@ -691,22 +691,8 @@ static struct pci_driver parport_serial_pci_driver = { .pm = &parport_serial_pm_ops, }, }; - - -static int __init parport_serial_init (void) -{ - return pci_register_driver (&parport_serial_pci_driver); -} - -static void __exit parport_serial_exit (void) -{ - pci_unregister_driver (&parport_serial_pci_driver); - return; -} +module_pci_driver(parport_serial_pci_driver); MODULE_AUTHOR("Tim Waugh "); MODULE_DESCRIPTION("Driver for common parallel+serial multi-I/O PCI cards"); MODULE_LICENSE("GPL"); - -module_init(parport_serial_init); -module_exit(parport_serial_exit); -- 2.15.1