From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 08E58415F08; Mon, 3 Aug 2026 14:44:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768254; cv=none; b=pbmel/1eNj43uIlQq/4ZllulIwUL+IEWYgxRBFcnv/O4nZnN7E6SjITIh3IqZQhs4RZ6oBIlvTu2BHoSHZUb4JafAOQHhiVY9K50f0tpwWzqqAWMuKbMkpuUoLpNiKQc95f095A3y50js2W8ao2D4gyz+nH5lh4hUMw9mWUFM3s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768254; c=relaxed/simple; bh=DunFNjHwf3icjYe5ZHlztX4j2oXJeKJ129eE46vw5/c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uUTAO/EYdmMG/11SlaSpIO9XHbeyt0ZtzZD0fIWjQ36gJVOJbGcyJ4Myi6zx5f7qTUI+qI9JR3blsvd6hq11XiM3Kn+6TQc4QSEOf/oZZmo94H+O1oKfdIvLArl230qFCkVft3Jq/S86beQ5cpLY7GLMShYDv6QY1t6loF2vBJo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OrYZUQoq; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OrYZUQoq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2CBD1F00A3A; Mon, 3 Aug 2026 14:43:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768252; bh=0Wy9JOaeFGBeAJk92ZmHHFd5ZfCYJpWQRTgBXTS91c4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=OrYZUQoq0laq8B7dUK0dQO+htHpXQwZrGnduhQUnF9/U6evzdxDerO+bgxkoMHVVQ x4oxojMN+2ehH0hWDWAzt5DZErNKnTLZjlckqMo+JDlvFmhGRs8RUYVxm2TqWOZ05C /qnkRdlRhPXHlIB0Xd55ML6EhGbO1+4GP6MNMEjqJ1G8V1zM6JbOjgU1minK09vy1t U69m6JMKdko8At1EYn16xcgcgS607UBhE1xBIepZU0ma4h+zSfAPnCVmhAvGIMfhDO mSegpMW2pEmO/Jv7Jiq23zw6Q3sqUMa1hHFpgi3z50FaZsGN6Mogty05BM6UKRvFmX vaTVmnq9UmkhQ== From: Jisheng Zhang To: Mark Brown , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Radu Pirea , Vladimir Moravcevic , Tzu-Hao Wei , Swark Yang , Prasad Bolisetty , Kamal Dasu , William Zhang , Kursad Oney , Jonas Gorski , Anand Gore , Florian Fainelli , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Vladimir Oltean , Frank Li , Ray Jui , Scott Branden , Yinbo Zhu , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Heiko Stuebner , Andi Shyti , Tudor Ambarus , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Li-hao Kuo , Masahisa Kojima , Jassi Brar , Laxman Dewangan , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Michal Simek Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 21/39] spi: mxic: use modern PM macros Date: Mon, 3 Aug 2026 22:19:45 +0800 Message-ID: <20260803142003.12857-22-jszhang@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org> References: <20260803142003.12857-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Use the modern PM macros for the suspend and resume functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_PM_SLEEP are disabled, without having to use __maybe_unused. Signed-off-by: Jisheng Zhang --- drivers/spi/spi-mxic.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/spi/spi-mxic.c b/drivers/spi/spi-mxic.c index 83b688e65284..e3c85e5191e3 100644 --- a/drivers/spi/spi-mxic.c +++ b/drivers/spi/spi-mxic.c @@ -721,7 +721,7 @@ static int mxic_spi_mem_ecc_probe(struct platform_device *pdev, return 0; } -static int __maybe_unused mxic_spi_runtime_suspend(struct device *dev) +static int mxic_spi_runtime_suspend(struct device *dev) { struct spi_controller *host = dev_get_drvdata(dev); struct mxic_spi *mxic = spi_controller_get_devdata(host); @@ -732,7 +732,7 @@ static int __maybe_unused mxic_spi_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused mxic_spi_runtime_resume(struct device *dev) +static int mxic_spi_runtime_resume(struct device *dev) { struct spi_controller *host = dev_get_drvdata(dev); struct mxic_spi *mxic = spi_controller_get_devdata(host); @@ -748,8 +748,7 @@ static int __maybe_unused mxic_spi_runtime_resume(struct device *dev) } static const struct dev_pm_ops mxic_spi_dev_pm_ops = { - SET_RUNTIME_PM_OPS(mxic_spi_runtime_suspend, - mxic_spi_runtime_resume, NULL) + RUNTIME_PM_OPS(mxic_spi_runtime_suspend, mxic_spi_runtime_resume, NULL) }; static int mxic_spi_probe(struct platform_device *pdev) @@ -850,7 +849,7 @@ static struct platform_driver mxic_spi_driver = { .driver = { .name = "mxic-spi", .of_match_table = mxic_spi_of_ids, - .pm = &mxic_spi_dev_pm_ops, + .pm = pm_ptr(&mxic_spi_dev_pm_ops), }, }; module_platform_driver(mxic_spi_driver); -- 2.53.0