From patchwork Fri Jun 16 16:50:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Wilczynski X-Patchwork-Id: 693301 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 D012BEB64D7 for ; Fri, 16 Jun 2023 16:53:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345736AbjFPQxH (ORCPT ); Fri, 16 Jun 2023 12:53:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345741AbjFPQwN (ORCPT ); Fri, 16 Jun 2023 12:52:13 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7820B35A5; Fri, 16 Jun 2023 09:51:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686934282; x=1718470282; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KUa89HHIfqiRuH33Slfb9eUQnsMLPp8P5obcJE6sL2I=; b=LaDJmPh/NTe/S0NAVaItbV1I2DQr9LAhYspP1XbGkF4EL3AX1u9/p31W Xtop+C2nWzwaeCPCfmMSJuo72YO/X3QPdexYB/CfzV4vEOAxmSUgzxOWf yOdQva2XXrxk2tlv6TrJwmwf+WkLhTXFCyarY36Lto8SuECTPH8K/UhDh QKkJVnVRoPZvUmBC06VsOo0KTX5ClT0s0oNpOtHYMbnwB5GPSo7LerXAS 6loOfdPNt5GxhODtQ/5H4m8XwDnXBOeSnaMHn1L5sl1k+EhQO7+Un9snV Mdrt4aqzsz8oA+nMXt9itjGXTElqoYUGJYB4Utpm/ncnWXNpH60MGooR4 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10743"; a="422913060" X-IronPort-AV: E=Sophos;i="6.00,248,1681196400"; d="scan'208";a="422913060" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jun 2023 09:51:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10743"; a="707154203" X-IronPort-AV: E=Sophos;i="6.00,248,1681196400"; d="scan'208";a="707154203" Received: from powerlab.fi.intel.com ([10.237.71.25]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jun 2023 09:51:17 -0700 From: Michal Wilczynski To: linux-acpi@vger.kernel.org Cc: rafael@kernel.org, dan.j.williams@intel.com, vishal.l.verma@intel.com, lenb@kernel.org, dave.jiang@intel.com, ira.weiny@intel.com, rui.zhang@intel.com, linux-kernel@vger.kernel.org, nvdimm@lists.linux.dev, Michal Wilczynski Subject: [PATCH v5 07/10] acpi/nfit: Move acpi_nfit_notify() before acpi_nfit_add() Date: Fri, 16 Jun 2023 19:50:31 +0300 Message-ID: <20230616165034.3630141-8-michal.wilczynski@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230616165034.3630141-1-michal.wilczynski@intel.com> References: <20230616165034.3630141-1-michal.wilczynski@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org To use new style of installing event handlers acpi_nfit_notify() needs to be known inside acpi_nfit_add(). Move acpi_nfit_notify() upwards in the file, so it can be used inside acpi_nfit_add(). Signed-off-by: Michal Wilczynski --- drivers/acpi/nfit/core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index 07204d482968..aff79cbc2190 100644 --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c @@ -3312,6 +3312,13 @@ void acpi_nfit_shutdown(void *data) } EXPORT_SYMBOL_GPL(acpi_nfit_shutdown); +static void acpi_nfit_notify(struct acpi_device *adev, u32 event) +{ + device_lock(&adev->dev); + __acpi_nfit_notify(&adev->dev, adev->handle, event); + device_unlock(&adev->dev); +} + static int acpi_nfit_add(struct acpi_device *adev) { struct acpi_buffer buf = { ACPI_ALLOCATE_BUFFER, NULL }; @@ -3446,13 +3453,6 @@ void __acpi_nfit_notify(struct device *dev, acpi_handle handle, u32 event) } EXPORT_SYMBOL_GPL(__acpi_nfit_notify); -static void acpi_nfit_notify(struct acpi_device *adev, u32 event) -{ - device_lock(&adev->dev); - __acpi_nfit_notify(&adev->dev, adev->handle, event); - device_unlock(&adev->dev); -} - static const struct acpi_device_id acpi_nfit_ids[] = { { "ACPI0012", 0 }, { "", 0 },