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 97EF741D21E; Mon, 3 Aug 2026 14:46:14 +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=1785768376; cv=none; b=tWSieChI118+P+tPJ+xSOIRI8Tnyt4x/3QqFi2H12sDJBooR9I0KrQGPL2Fz1J6L6UObqaaeg1uaDSSVamqqKaolLqb42+BxZiyPxPHOw2+SY7++LikYcL4qwopVHeXu9jfaBjg1Dl9/JJ2C7XwUrv8hU4DfHN82KsAJPCdoVWk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785768376; c=relaxed/simple; bh=HlpKTsyKoHTmzQrNpZAv5jOHHbvlj4P35xVIVLaPlDA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rM9j8oRcs0VSLoEPW7km2yLnfa1Wiy+sV26lTkxp+wfcwue+hELQpIYFiG/Sa6XYAXcK/jBdJK/ByEz+UHe1H/TWMdJJSZr8zSFpKrmNz8fDJ2nPCe5UpDu0bD/8evuq/tEx2zDRQyBIowMqp0DEcLJuuRfFOjl+bVFfn60fCuQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gzzocITx; 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="gzzocITx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E01B61F00A3A; Mon, 3 Aug 2026 14:46:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785768373; bh=llaQZ6uCqmKYby9DFqY5vdo6Mqo0ZPuV/PFMlIezwUU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=gzzocITx7naUalh1nwW/zr7lTVTdTp98MkwwzHocAJuEdCu/i2fuD+hcH4CaG3mvf 4vRKQIzIyUXyByMowUeWn6Ge4uVK7xtIfPMCbp8C2HgKeWXlj3cmJjZ5RylPYS7h4O jv6JOv53PCv491baP45xMT3AvPbjxPOsQ5Or0CBwuD3k9UtfuufnovCxl1FgGFjOL/ h6k44kNs19I/qCGh/+XzPwqnJ8aa2COU7ky+fg32Uxv4cmIYVPIBwIZiX9xdPc38fB EiW7Ftny1bGhQm9897ykYDxcYYwk5GxsL2lX/fquMh5w9HqXameEX5YMKn9Daw9nke IyOhLKXqJ0YAg== 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 31/39] spi: sprd: use modern PM macros Date: Mon, 3 Aug 2026 22:19:55 +0800 Message-ID: <20260803142003.12857-32-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-sprd.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/spi/spi-sprd.c b/drivers/spi/spi-sprd.c index 29380938ef65..12b09174bb24 100644 --- a/drivers/spi/spi-sprd.c +++ b/drivers/spi/spi-sprd.c @@ -1016,7 +1016,7 @@ static void sprd_spi_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); } -static int __maybe_unused sprd_spi_runtime_suspend(struct device *dev) +static int sprd_spi_runtime_suspend(struct device *dev) { struct spi_controller *sctlr = dev_get_drvdata(dev); struct sprd_spi *ss = spi_controller_get_devdata(sctlr); @@ -1029,7 +1029,7 @@ static int __maybe_unused sprd_spi_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused sprd_spi_runtime_resume(struct device *dev) +static int sprd_spi_runtime_resume(struct device *dev) { struct spi_controller *sctlr = dev_get_drvdata(dev); struct sprd_spi *ss = spi_controller_get_devdata(sctlr); @@ -1050,8 +1050,7 @@ static int __maybe_unused sprd_spi_runtime_resume(struct device *dev) } static const struct dev_pm_ops sprd_spi_pm_ops = { - SET_RUNTIME_PM_OPS(sprd_spi_runtime_suspend, - sprd_spi_runtime_resume, NULL) + RUNTIME_PM_OPS(sprd_spi_runtime_suspend, sprd_spi_runtime_resume, NULL) }; static const struct of_device_id sprd_spi_of_match[] = { @@ -1064,7 +1063,7 @@ static struct platform_driver sprd_spi_driver = { .driver = { .name = "sprd-spi", .of_match_table = sprd_spi_of_match, - .pm = &sprd_spi_pm_ops, + .pm = pm_ptr(&sprd_spi_pm_ops), }, .probe = sprd_spi_probe, .remove = sprd_spi_remove, -- 2.53.0