From patchwork Wed Mar 3 09:16:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 393289 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96A95C4332D for ; Thu, 4 Mar 2021 00:30:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6E0F66023B for ; Thu, 4 Mar 2021 00:30:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234046AbhCDAa1 (ORCPT ); Wed, 3 Mar 2021 19:30:27 -0500 Received: from mga04.intel.com ([192.55.52.120]:40801 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357397AbhCCKtl (ORCPT ); Wed, 3 Mar 2021 05:49:41 -0500 IronPort-SDR: x+OvfQ8kh9yE037ElUIzsaBKYWSxr6BKdPxAlElRkJfpNR3NAFAvsTsYQmpc1wnfJ48AvbhatQ Fl9LMYay4hkA== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="184731228" X-IronPort-AV: E=Sophos;i="5.81,219,1610438400"; d="scan'208";a="184731228" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2021 01:16:57 -0800 IronPort-SDR: HlrOf6E20vkvsulGkFFHov5kbYGgScgOU705rG0tVprAQJlL53Chwuhqnj8YK/T275m/+SyAx/ 5Sl1CPw8OKrg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,219,1610438400"; d="scan'208";a="383914452" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga002.jf.intel.com with ESMTP; 03 Mar 2021 01:16:55 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 47207F4; Wed, 3 Mar 2021 11:16:55 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , Mark Brown , Sudip Mukherjee , Mauro Carvalho Chehab , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman Subject: [PATCH v3 2/3] spi: butterfly: Switch to use module_parport_driver() Date: Wed, 3 Mar 2021 11:16:41 +0200 Message-Id: <20210303091642.23929-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210303091642.23929-1-andriy.shevchenko@linux.intel.com> References: <20210303091642.23929-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Switch to use module_parport_driver() to reduce boilerplate code. Note, device_initcall() is a default for module_init(). Signed-off-by: Andy Shevchenko Acked-by: Mark Brown --- drivers/spi/spi-butterfly.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/spi/spi-butterfly.c b/drivers/spi/spi-butterfly.c index 7e71a351f3b7..cceae816cebc 100644 --- a/drivers/spi/spi-butterfly.c +++ b/drivers/spi/spi-butterfly.c @@ -317,18 +317,7 @@ static struct parport_driver butterfly_driver = { .detach = butterfly_detach, .devmodel = true, }; - -static int __init butterfly_init(void) -{ - return parport_register_driver(&butterfly_driver); -} -device_initcall(butterfly_init); - -static void __exit butterfly_exit(void) -{ - parport_unregister_driver(&butterfly_driver); -} -module_exit(butterfly_exit); +module_parport_driver(butterfly_driver); MODULE_DESCRIPTION("Parport Adapter driver for AVR Butterfly"); MODULE_LICENSE("GPL");