From patchwork Thu Jul 20 20:53:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13321060 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 0F53BC0015E for ; Thu, 20 Jul 2023 20:53:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230171AbjGTUxb (ORCPT ); Thu, 20 Jul 2023 16:53:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230038AbjGTUx1 (ORCPT ); Thu, 20 Jul 2023 16:53:27 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3627271D; Thu, 20 Jul 2023 13:53:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689886405; x=1721422405; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6gvmEe3/mK3F1A2VhT834ZdAXT1htPyMLu4MYEFgzHY=; b=CraRJbn9hXjdDioAnzg2J1C7xgaeA1PGgO9Q/hhAWsG4oIBfziMrQvdE VJpVj/UKpLN34dvMSeSLq+zxX9ibl43ajxvs3ZBsECyqSkW7ElRQQHzvt 8BeCUh+wI/yU7g9GAG70utcCRMInvJfOyx+z8fauHwMe6d+c0ZrjvHjwT vapl8Bb6LbLncQRhIPN/wZPoIbxwBRpkW+1v6X9i0w1BbIPcsKh7BDnLH L477mo04hshLMuBcpSCxrTorgZMZi7ZQlUoZ78a3CkHjV0noAK42B8Ly/ 4QtR/yRPwkdT7kTlQk7mhpb43/k+SSNIlkW65zHgpz2/K8v/HCnVhsZ9W w==; X-IronPort-AV: E=McAfee;i="6600,9927,10777"; a="356846054" X-IronPort-AV: E=Sophos;i="6.01,219,1684825200"; d="scan'208";a="356846054" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2023 13:53:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10777"; a="838273950" X-IronPort-AV: E=Sophos;i="6.01,219,1684825200"; d="scan'208";a="838273950" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 20 Jul 2023 13:53:23 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 6E85069A; Thu, 20 Jul 2023 23:53:28 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jonathan Cameron , Lars-Peter Clausen Subject: [PATCH v1 7/8] iio: core: Move initcalls closer to the respective calls Date: Thu, 20 Jul 2023 23:53:23 +0300 Message-Id: <20230720205324.58702-8-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b In-Reply-To: <20230720205324.58702-1-andriy.shevchenko@linux.intel.com> References: <20230720205324.58702-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 --- 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 e29772940886..202a1a67ba98 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");