]> Git Repo - linux.git/commitdiff
spi: tegra20-slink: Declare runtime suspend and resume functions conditionally
authorGuenter Roeck <[email protected]>
Tue, 7 Sep 2021 04:53:58 +0000 (21:53 -0700)
committerMark Brown <[email protected]>
Thu, 9 Sep 2021 13:16:27 +0000 (14:16 +0100)
The following build error is seen with CONFIG_PM=n.

drivers/spi/spi-tegra20-slink.c:1188:12: error:
'tegra_slink_runtime_suspend' defined but not used
drivers/spi/spi-tegra20-slink.c:1200:12: error:
'tegra_slink_runtime_resume' defined but not used

Declare the functions only if PM is enabled. While at it, remove the
unnecessary forward declarations.

Signed-off-by: Guenter Roeck <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Acked-by: Thierry Reding <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
drivers/spi/spi-tegra20-slink.c

index ebd27f88303315db415e077e75a14a34170337b6..8ce840c7ecc82c7be7bb88fd2d7198f7bee200cb 100644 (file)
@@ -204,9 +204,6 @@ struct tegra_slink_data {
        struct dma_async_tx_descriptor          *tx_dma_desc;
 };
 
-static int tegra_slink_runtime_suspend(struct device *dev);
-static int tegra_slink_runtime_resume(struct device *dev);
-
 static inline u32 tegra_slink_readl(struct tegra_slink_data *tspi,
                unsigned long reg)
 {
@@ -1185,6 +1182,7 @@ static int tegra_slink_resume(struct device *dev)
 }
 #endif
 
+#ifdef CONFIG_PM
 static int tegra_slink_runtime_suspend(struct device *dev)
 {
        struct spi_master *master = dev_get_drvdata(dev);
@@ -1210,6 +1208,7 @@ static int tegra_slink_runtime_resume(struct device *dev)
        }
        return 0;
 }
+#endif /* CONFIG_PM */
 
 static const struct dev_pm_ops slink_pm_ops = {
        SET_RUNTIME_PM_OPS(tegra_slink_runtime_suspend,
This page took 0.058184 seconds and 4 git commands to generate.