From: Jisheng Zhang <jszhang@kernel.org>
To: "Mark Brown" <broonie@kernel.org>,
"Nicolas Ferre" <nicolas.ferre@microchip.com>,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
"Claudiu Beznea" <claudiu.beznea@tuxon.dev>,
"Radu Pirea" <radu_nicolae.pirea@upb.ro>,
"Vladimir Moravcevic" <vmoravcevic@axiado.com>,
"Tzu-Hao Wei" <twei@axiado.com>, "Swark Yang" <syang@axiado.com>,
"Prasad Bolisetty" <pbolisetty@axiado.com>,
"Kamal Dasu" <kamal.dasu@broadcom.com>,
"William Zhang" <william.zhang@broadcom.com>,
"Kursad Oney" <kursad.oney@broadcom.com>,
"Jonas Gorski" <jonas.gorski@gmail.com>,
"Anand Gore" <anand.gore@broadcom.com>,
"Florian Fainelli" <florian.fainelli@broadcom.com>,
"Rafał Miłecki" <rafal@milecki.pl>,
"Vladimir Oltean" <olteanv@gmail.com>,
"Frank Li" <Frank.Li@nxp.com>, "Ray Jui" <rjui@broadcom.com>,
"Scott Branden" <sbranden@broadcom.com>,
"Yinbo Zhu" <zhuyinbo@loongson.cn>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Kevin Hilman" <khilman@baylibre.com>,
"Jerome Brunet" <jbrunet@baylibre.com>,
"Martin Blumenstingl" <martin.blumenstingl@googlemail.com>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
"Linus Walleij" <linusw@kernel.org>,
"Heiko Stuebner" <heiko@sntech.de>,
"Andi Shyti" <andi.shyti@kernel.org>,
"Tudor Ambarus" <tudor.ambarus@linaro.org>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
"Alim Akhtar" <alim.akhtar@samsung.com>,
"Orson Zhai" <orsonzhai@gmail.com>,
"Baolin Wang" <baolin.wang@linux.alibaba.com>,
"Chunyan Zhang" <zhang.lyra@gmail.com>,
"Li-hao Kuo" <lhjeff911@gmail.com>,
"Masahisa Kojima" <kojima.masahisa@socionext.com>,
"Jassi Brar" <jassisinghbrar@gmail.com>,
"Laxman Dewangan" <ldewangan@nvidia.com>,
"Thierry Reding" <thierry.reding@kernel.org>,
"Jonathan Hunter" <jonathanh@nvidia.com>,
"Sowjanya Komatineni" <skomatineni@nvidia.com>,
"Michal Simek" <michal.simek@amd.com>
Cc: bcm-kernel-feedback-list@broadcom.com, linux-spi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 11/39] spi: dw-pci: use modern PM macros
Date: Mon, 3 Aug 2026 22:19:35 +0800 [thread overview]
Message-ID: <20260803142003.12857-12-jszhang@kernel.org> (raw)
In-Reply-To: <20260803142003.12857-1-jszhang@kernel.org>
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 #ifdef guards.
This has the advantage of always compiling these functions in,
independently of any Kconfig option. Thanks to that, bugs and other
regressions are subsequently easier to catch.
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
drivers/spi/spi-dw-pci.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/spi/spi-dw-pci.c b/drivers/spi/spi-dw-pci.c
index bfb874f96a26..2f3bea51f1e6 100644
--- a/drivers/spi/spi-dw-pci.c
+++ b/drivers/spi/spi-dw-pci.c
@@ -154,7 +154,6 @@ static void dw_spi_pci_remove(struct pci_dev *pdev)
dw_spi_remove_controller(dws);
}
-#ifdef CONFIG_PM_SLEEP
static int dw_spi_pci_suspend(struct device *dev)
{
struct dw_spi *dws = dev_get_drvdata(dev);
@@ -168,9 +167,8 @@ static int dw_spi_pci_resume(struct device *dev)
return dw_spi_resume_controller(dws);
}
-#endif
-static SIMPLE_DEV_PM_OPS(dw_spi_pci_pm_ops, dw_spi_pci_suspend, dw_spi_pci_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(dw_spi_pci_pm_ops, dw_spi_pci_suspend, dw_spi_pci_resume);
static const struct pci_device_id dw_spi_pci_ids[] = {
/* Intel MID platform SPI controller 0 */
@@ -197,7 +195,7 @@ static struct pci_driver dw_spi_pci_driver = {
.probe = dw_spi_pci_probe,
.remove = dw_spi_pci_remove,
.driver = {
- .pm = &dw_spi_pci_pm_ops,
+ .pm = pm_sleep_ptr(&dw_spi_pci_pm_ops),
},
};
module_pci_driver(dw_spi_pci_driver);
--
2.53.0
next prev parent reply other threads:[~2026-08-03 14:42 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-03 14:19 [PATCH 00/39] spi: use modern PM macros Jisheng Zhang
2026-08-03 14:19 ` [PATCH 01/39] spi: atmel-quadspi: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 02/39] spi: amlogic-spifc-a1: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 03/39] spi: at91-usart: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 04/39] spi: axiado: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 05/39] spi: bcm-qspi: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 06/39] spi: bcm63xx-hsspi: " Jisheng Zhang
2026-08-04 21:19 ` William Zhang
2026-08-03 14:19 ` [PATCH 07/39] spi: bcmbca-hsspi: " Jisheng Zhang
2026-08-04 21:20 ` William Zhang
2026-08-03 14:19 ` [PATCH 08/39] spi: cadence: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 09/39] spi: coldfire-qspi: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 10/39] spi: dln2: " Jisheng Zhang
2026-08-03 14:19 ` Jisheng Zhang [this message]
2026-08-03 14:19 ` [PATCH 12/39] spi: spi-fsl-dspi: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 13/39] spi: fsl-espi: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 14/39] spi: fsl-lpspi: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 15/39] spi: qcom-geni: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 16/39] spi: img-spfi: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 17/39] spi: loongson: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 18/39] spi: meson-spifc: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 19/39] spi: mt65xx: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 20/39] spi: mtk-nor: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 21/39] spi: mxic: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 22/39] spi: omap2-mcspi: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 23/39] spi: orion: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 24/39] spi: pl022: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 25/39] spi: spi-qcom-qspi: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 26/39] spi: qup: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 27/39] spi: rockchip-sfc: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 28/39] spi: rockchip: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 29/39] spi: s3c64xx: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 30/39] spi: slave-mt27xx: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 31/39] spi: sprd: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 32/39] spi: sunplus-sp7021: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 33/39] spi: syncuacer: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 34/39] spi: tegra114: " Jisheng Zhang
2026-08-03 14:19 ` [PATCH 35/39] spi: tegra20-sflash: " Jisheng Zhang
2026-08-03 14:20 ` [PATCH 36/39] spi: tegra20-slink: " Jisheng Zhang
2026-08-03 14:20 ` [PATCH 37/39] spi: tegra210-quad: " Jisheng Zhang
2026-08-03 14:20 ` [PATCH 38/39] spi: topcliff-pch: " Jisheng Zhang
2026-08-03 14:20 ` [PATCH 39/39] spi: zynqmp-gqspi: " Jisheng Zhang
2026-08-07 17:59 ` [PATCH 00/39] spi: " Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260803142003.12857-12-jszhang@kernel.org \
--to=jszhang@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=alexandre.belloni@bootlin.com \
--cc=alim.akhtar@samsung.com \
--cc=anand.gore@broadcom.com \
--cc=andi.shyti@kernel.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=baolin.wang@linux.alibaba.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=broonie@kernel.org \
--cc=claudiu.beznea@tuxon.dev \
--cc=florian.fainelli@broadcom.com \
--cc=heiko@sntech.de \
--cc=jassisinghbrar@gmail.com \
--cc=jbrunet@baylibre.com \
--cc=jonas.gorski@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=kamal.dasu@broadcom.com \
--cc=khilman@baylibre.com \
--cc=kojima.masahisa@socionext.com \
--cc=krzk@kernel.org \
--cc=kursad.oney@broadcom.com \
--cc=ldewangan@nvidia.com \
--cc=lhjeff911@gmail.com \
--cc=linusw@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=matthias.bgg@gmail.com \
--cc=michal.simek@amd.com \
--cc=neil.armstrong@linaro.org \
--cc=nicolas.ferre@microchip.com \
--cc=olteanv@gmail.com \
--cc=orsonzhai@gmail.com \
--cc=pbolisetty@axiado.com \
--cc=radu_nicolae.pirea@upb.ro \
--cc=rafal@milecki.pl \
--cc=rjui@broadcom.com \
--cc=sbranden@broadcom.com \
--cc=skomatineni@nvidia.com \
--cc=syang@axiado.com \
--cc=thierry.reding@kernel.org \
--cc=tudor.ambarus@linaro.org \
--cc=twei@axiado.com \
--cc=vmoravcevic@axiado.com \
--cc=william.zhang@broadcom.com \
--cc=zhang.lyra@gmail.com \
--cc=zhuyinbo@loongson.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.