From patchwork Tue Feb 16 11:07:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12089833 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=ham 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 4AC91C433E6 for ; Tue, 16 Feb 2021 11:10:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 11F2964DE0 for ; Tue, 16 Feb 2021 11:10:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229830AbhBPLKE (ORCPT ); Tue, 16 Feb 2021 06:10:04 -0500 Received: from mga09.intel.com ([134.134.136.24]:49486 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230049AbhBPLJU (ORCPT ); Tue, 16 Feb 2021 06:09:20 -0500 IronPort-SDR: F/ONUZqqmfmlElqziYAoT9gvFoUBrv9dl1vGSfft/n1RjT95KIaAACuNsa+zk4AP9X7SS16Bt7 cBstjTbGBvDA== X-IronPort-AV: E=McAfee;i="6000,8403,9896"; a="182992613" X-IronPort-AV: E=Sophos;i="5.81,183,1610438400"; d="scan'208";a="182992613" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2021 03:07:47 -0800 IronPort-SDR: yIB21iHD5n0T4QrLFJY27zSx33lUfLBxLL7myxINaHMWDtx4u7jQgkzd8AQb1V3giPoz0+yPrg 12KxDVBCD1Ww== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,183,1610438400"; d="scan'208";a="377522912" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga002.jf.intel.com with ESMTP; 16 Feb 2021 03:07:46 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 1E692169; Tue, 16 Feb 2021 13:07:45 +0200 (EET) From: Andy Shevchenko To: Mark Brown , Andy Shevchenko , Sudip Mukherjee , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/3] spi: butterfly: Switch to use module_parport_driver() Date: Tue, 16 Feb 2021 13:07:40 +0200 Message-Id: <20210216110741.1286-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210216110741.1286-1-andriy.shevchenko@linux.intel.com> References: <20210216110741.1286-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 --- v2: added Ack (Mark) 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");