summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-rpc-if.c
diff options
context:
space:
mode:
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>2021-01-07 14:53:29 +0000
committerMark Brown <broonie@kernel.org>2021-01-11 16:39:09 +0000
commitbfeccc6a18de52529ada66ea3afe934004b4b36e (patch)
tree143e74134c9d88a7da4d1a36253348f4e8f4b117 /drivers/spi/spi-rpc-if.c
parent2ef0170e90391f1adb31c449059b8efdc923707c (diff)
spi: rpc-if: Gaurd .pm assignment with CONFIG_PM_SLEEP #ifdef check
With CONFIG_PM_SLEEP disabled the rpcif_spi_pm_ops variable is still referenced and thus increasing the size of kernel. Fix this issue by adding CONFIG_PM_SLEEP #ifdef check around the .pm assignment (image size is critical on RZ/A SoC's where the SRAM sizes range 4~5 MiB). Fixes: 9584fc95cadc0 ("spi: rpc-if: Remove CONFIG_PM_SLEEP ifdefery") Reported-by: Geert Uytterhoeven <geert+renesas@glider.be> Suggested-by: Pavel Machek <pavel@denx.de> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Link: https://lore.kernel.org/r/20210107145329.27966-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-rpc-if.c')
-rw-r--r--drivers/spi/spi-rpc-if.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/spi/spi-rpc-if.c b/drivers/spi/spi-rpc-if.c
index c313dbe6185c..c53138ce0030 100644
--- a/drivers/spi/spi-rpc-if.c
+++ b/drivers/spi/spi-rpc-if.c
@@ -197,7 +197,9 @@ static struct platform_driver rpcif_spi_driver = {
.remove = rpcif_spi_remove,
.driver = {
.name = "rpc-if-spi",
+#ifdef CONFIG_PM_SLEEP
.pm = &rpcif_spi_pm_ops,
+#endif
},
};
module_platform_driver(rpcif_spi_driver);