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: "Wilczynski, Michal" X-Patchwork-Id: 109270 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1485695vqr; Fri, 16 Jun 2023 10:01:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4NDli0Ir3qPt6lfS6XezAT88U1AeSRTNis+JKHojGD0koRKOTskSNL5KLOX4KE/PXLF89Z X-Received: by 2002:a17:902:8bcc:b0:1b3:d432:3026 with SMTP id r12-20020a1709028bcc00b001b3d4323026mr1922833plo.15.1686934906254; Fri, 16 Jun 2023 10:01:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686934906; cv=none; d=google.com; s=arc-20160816; b=LPOjS5xamCqfEk5JMn5M5ZBTzE7JoufOWgGV2KABs77lhj4NKgbq1NtJQWljILovOO NhV1U/Ka3sH7SFA3XUJYZLbNO7Tgjw24cHQ+k+LX9GAoAaBDOPFe61RdzvOJdytisoKO 1O2FQQko26vDcMx/MF0kGvxf4UcLpxxQZGRF/eo9zE64mU0HFditWd1h4DWSvefE08uX TQDr+Harsw+f3KtQaH0yOEKs26ZB51iSyGAWW2DbQmSxqRQlegMJ12ml3sPst6s1l1k5 vK+mexjJOeXIAqMqPkKKEOIjQekAe1FSFl5HPzJXK3N/Jx1gga0VWiFNV1nPAIKFsQiS bJLA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p14-20020a170902e74e00b001afc602cd55si15767527plf.21.2023.06.16.10.01.30; Fri, 16 Jun 2023 10:01:46 -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 S1345754AbjFPQxI (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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768879456325028694?= X-GMAIL-MSGID: =?utf-8?q?1768879456325028694?= 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 },