From patchwork Fri Jul 21 17:00:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13322383 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 718EDC00528 for ; Fri, 21 Jul 2023 17:00:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231180AbjGURAZ (ORCPT ); Fri, 21 Jul 2023 13:00:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230502AbjGURAY (ORCPT ); Fri, 21 Jul 2023 13:00:24 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73F7426A0; Fri, 21 Jul 2023 10:00:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689958821; x=1721494821; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KFTy3k5fjmzvEVapIibfwY9OKXik6UjBLw7ZmKrmWGc=; b=mujet7A7G3cW9RxjpJlxrLBXPxjpvfvbbNyXEUS9B7UDoMPOlJIpwUW3 PcLMSKN73OoIPB1yv2tNMiv4ohaH4J9wbufRWLtqyZedbcAm0fkumTmiZ KWICt0RDZFOSx/mVlxFKuFVDhmdQl4NfbZxQH4BqENv2he2Y5pil368K5 KeD1yFT1w/7CjthkQh1AOSi51025Ke/nNBy9cdVmhGmTQjYv15xBOPI39 eYf2Rp/ToISCDt5xiQdzPbVxtGumbFJevh1phIKmT+nk7MYTcd7Bs7OhE YiNWQgmlckpcCFQFDBgz5QJBBwutxA6c3oeHqXnujyF79eZR8zpavQivx Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10778"; a="453443965" X-IronPort-AV: E=Sophos;i="6.01,222,1684825200"; d="scan'208";a="453443965" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2023 10:00:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10778"; a="675106536" X-IronPort-AV: E=Sophos;i="6.01,222,1684825200"; d="scan'208";a="675106536" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga003.jf.intel.com with ESMTP; 21 Jul 2023 10:00:18 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 7D2F866C; Fri, 21 Jul 2023 20:00:23 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jonathan Cameron , Lars-Peter Clausen , Nuno Sa Subject: [PATCH v2 7/8] iio: core: Move initcalls closer to the respective calls Date: Fri, 21 Jul 2023 20:00:21 +0300 Message-Id: <20230721170022.3461-8-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b In-Reply-To: <20230721170022.3461-1-andriy.shevchenko@linux.intel.com> References: <20230721170022.3461-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Move subsys_initcall() and module_exit() closer to the respective calls. Signed-off-by: Andy Shevchenko Reviewed-by: Nuno Sa --- drivers/iio/industrialio-core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index a9b9804097ab..5c9c68d69fc6 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c @@ -354,6 +354,7 @@ static int __init iio_init(void) error_nothing: return ret; } +subsys_initcall(iio_init); static void __exit iio_exit(void) { @@ -362,6 +363,7 @@ static void __exit iio_exit(void) bus_unregister(&iio_bus_type); debugfs_remove(iio_debugfs_dentry); } +module_exit(iio_exit); #if defined(CONFIG_DEBUG_FS) static ssize_t iio_debugfs_read_reg(struct file *file, char __user *userbuf, @@ -2118,9 +2120,6 @@ int iio_device_get_current_mode(struct iio_dev *indio_dev) } EXPORT_SYMBOL_GPL(iio_device_get_current_mode); -subsys_initcall(iio_init); -module_exit(iio_exit); - MODULE_AUTHOR("Jonathan Cameron "); MODULE_DESCRIPTION("Industrial I/O core"); MODULE_LICENSE("GPL");