All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spi: lpspi: Remove CONFIG_PM_SLEEP ifdefery
@ 2020-08-17 23:58 Fabio Estevam
  2020-08-18 16:57 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2020-08-17 23:58 UTC (permalink / raw)
  To: broonie; +Cc: linux-spi, xiaoning.wang, Fabio Estevam

Use __maybe_unused for the suspend()/resume() hooks and get rid of
the CONFIG_PM_SLEEP ifdefery to improve the code.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 drivers/spi/spi-fsl-lpspi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c
index 85a5c952389a..986b9793fd3c 100644
--- a/drivers/spi/spi-fsl-lpspi.c
+++ b/drivers/spi/spi-fsl-lpspi.c
@@ -944,8 +944,7 @@ static int fsl_lpspi_remove(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
-static int fsl_lpspi_suspend(struct device *dev)
+static int __maybe_unused fsl_lpspi_suspend(struct device *dev)
 {
 	int ret;
 
@@ -954,7 +953,7 @@ static int fsl_lpspi_suspend(struct device *dev)
 	return ret;
 }
 
-static int fsl_lpspi_resume(struct device *dev)
+static int __maybe_unused fsl_lpspi_resume(struct device *dev)
 {
 	int ret;
 
@@ -968,7 +967,6 @@ static int fsl_lpspi_resume(struct device *dev)
 
 	return 0;
 }
-#endif /* CONFIG_PM_SLEEP */
 
 static const struct dev_pm_ops fsl_lpspi_pm_ops = {
 	SET_RUNTIME_PM_OPS(fsl_lpspi_runtime_suspend,
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] spi: lpspi: Remove CONFIG_PM_SLEEP ifdefery
  2020-08-17 23:58 [PATCH] spi: lpspi: Remove CONFIG_PM_SLEEP ifdefery Fabio Estevam
@ 2020-08-18 16:57 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2020-08-18 16:57 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: xiaoning.wang, linux-spi

On Mon, 17 Aug 2020 20:58:12 -0300, Fabio Estevam wrote:
> Use __maybe_unused for the suspend()/resume() hooks and get rid of
> the CONFIG_PM_SLEEP ifdefery to improve the code.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: lpspi: Remove CONFIG_PM_SLEEP ifdefery
      commit: c3158a891bcc4c79523804e0d09a195fb1f815b4

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-18 16:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-17 23:58 [PATCH] spi: lpspi: Remove CONFIG_PM_SLEEP ifdefery Fabio Estevam
2020-08-18 16:57 ` Mark Brown

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.