Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2934626rwd; Fri, 16 Jun 2023 10:01:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7cUeCt4144Q2XPceND9aKlgSpNJDqW9MagY+hwAx3MMQEnjDJ9turtyUx8R31I9Nj/CGCC X-Received: by 2002:a17:902:dad1:b0:1b3:9042:fd31 with SMTP id q17-20020a170902dad100b001b39042fd31mr2961221plx.26.1686934871482; Fri, 16 Jun 2023 10:01:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686934871; cv=none; d=google.com; s=arc-20160816; b=TTAjMmkxMFLnuQxOUiST1C/M1LWcm7HoozSXfgDCd65M+GnWWj6bKLHZ3hqyw7zI2f cCdjhKAffqtmU7Hwt1QBP9CkrVxoWD+Yja2B7+9NGQVE76jGX1BFtrFCRQX4A9PXegF7 ayqpmtieJfSJ+9cd23NmwEdZFnO449t5KbEuUhM/iV7uDpr/q2OsPFLKm1gVnNq13Gs4 SPIkRUOtPCuxAYg8bnyOL/BvZCM1AQ/j5TqnDEVdn1ONL7VFQjwSXY1jM3OuN1bHatoG BI8Nf6y5+hCUeKaVXr0zMUWRa/yty1Z8O4H2RylklrXV2CgBjZlozXQjKZRuEHNSod7k Iv7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IeIG8tKoxISSvo32Eu/gJ9AntBfNl5sAb874xmWLuIU=; b=bt+qQ5Jx+9ycfxjp/5TsKa45E4V0qGauHURFMO7Ps4hxmIa6M3v0x6MAUHxgf0APGv 8XFzfZKEaI9HyxnDYsAHn1xqsg0wurv/OOUnkFXLdDmIPZZIWrKUxqlo1h7vNA/Jcftj lybWhk76kv3dOfOTuQzWVpIiAF3z74Dl6ApVyYabUEbqxYgvug5/b12470hJ7OUlmhbj kR84iGqJ7vJWvSDJmZ0k0OpmqK6yz05KY1y0Oq+lQD4b1TLbf4JiIXciGz1M6uTDAkB9 aLyYDGuLHIhudRd0L3GjA0QC/LVqCbCzvNLxSqx58Jq3mSGeHU4pFuGFNMw6Ncte/f9d fgYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="LaDJmPh/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i6-20020a170902c28600b001ae3e5b31basi7292636pld.540.2023.06.16.10.00.55; Fri, 16 Jun 2023 10:01:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="LaDJmPh/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345750AbjFPQxI (ORCPT + 99 others); Fri, 16 Jun 2023 12:53:08 -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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 }, -- 2.41.0