All of lore.kernel.org
 help / color / mirror / Atom feed
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 07/39] spi: bcmbca-hsspi: use modern PM macros
Date: Mon,  3 Aug 2026 22:19:31 +0800	[thread overview]
Message-ID: <20260803142003.12857-8-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-bcmbca-hsspi.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/spi/spi-bcmbca-hsspi.c b/drivers/spi/spi-bcmbca-hsspi.c
index 09c1472ae4fa..570ea635ab0c 100644
--- a/drivers/spi/spi-bcmbca-hsspi.c
+++ b/drivers/spi/spi-bcmbca-hsspi.c
@@ -563,7 +563,6 @@ static void bcmbca_hsspi_remove(struct platform_device *pdev)
 	sysfs_remove_group(&pdev->dev.kobj, &bcmbca_hsspi_group);
 }
 
-#ifdef CONFIG_PM_SLEEP
 static int bcmbca_hsspi_suspend(struct device *dev)
 {
 	struct spi_controller *host = dev_get_drvdata(dev);
@@ -598,10 +597,9 @@ static int bcmbca_hsspi_resume(struct device *dev)
 
 	return 0;
 }
-#endif
 
-static SIMPLE_DEV_PM_OPS(bcmbca_hsspi_pm_ops, bcmbca_hsspi_suspend,
-			 bcmbca_hsspi_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(bcmbca_hsspi_pm_ops, bcmbca_hsspi_suspend,
+				bcmbca_hsspi_resume);
 
 static const struct of_device_id bcmbca_hsspi_of_match[] = {
 	{ .compatible = "brcm,bcmbca-hsspi-v1.1", },
@@ -613,7 +611,7 @@ MODULE_DEVICE_TABLE(of, bcmbca_hsspi_of_match);
 static struct platform_driver bcmbca_hsspi_driver = {
 	.driver = {
 		   .name = "bcmbca-hsspi",
-		   .pm = &bcmbca_hsspi_pm_ops,
+		   .pm = pm_sleep_ptr(&bcmbca_hsspi_pm_ops),
 		   .of_match_table = bcmbca_hsspi_of_match,
 		   },
 	.probe = bcmbca_hsspi_probe,
-- 
2.53.0


  parent reply	other threads:[~2026-08-03 14:41 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 ` Jisheng Zhang [this message]
2026-08-04 21:20   ` [PATCH 07/39] spi: bcmbca-hsspi: " 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 ` [PATCH 11/39] spi: dw-pci: " Jisheng Zhang
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-8-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.