Commit bfeccc6a authored by Lad Prabhakar's avatar Lad Prabhakar Committed by Mark Brown

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: 9584fc95 ("spi: rpc-if: Remove CONFIG_PM_SLEEP ifdefery")
Reported-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Suggested-by: default avatarPavel Machek <pavel@denx.de>
Signed-off-by: default avatarLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20210107145329.27966-1-prabhakar.mahadev-lad.rj@bp.renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2ef0170e
...@@ -197,7 +197,9 @@ static struct platform_driver rpcif_spi_driver = { ...@@ -197,7 +197,9 @@ static struct platform_driver rpcif_spi_driver = {
.remove = rpcif_spi_remove, .remove = rpcif_spi_remove,
.driver = { .driver = {
.name = "rpc-if-spi", .name = "rpc-if-spi",
#ifdef CONFIG_PM_SLEEP
.pm = &rpcif_spi_pm_ops, .pm = &rpcif_spi_pm_ops,
#endif
}, },
}; };
module_platform_driver(rpcif_spi_driver); module_platform_driver(rpcif_spi_driver);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment