Skip to content

Commit 2bab940

Browse files
groeckbroonie
authored andcommitted
spi: tegra20-slink: Declare runtime suspend and resume functions conditionally
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]>
1 parent 5457773 commit 2bab940

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/spi/spi-tegra20-slink.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,6 @@ struct tegra_slink_data {
204204
struct dma_async_tx_descriptor *tx_dma_desc;
205205
};
206206

207-
static int tegra_slink_runtime_suspend(struct device *dev);
208-
static int tegra_slink_runtime_resume(struct device *dev);
209-
210207
static inline u32 tegra_slink_readl(struct tegra_slink_data *tspi,
211208
unsigned long reg)
212209
{
@@ -1185,6 +1182,7 @@ static int tegra_slink_resume(struct device *dev)
11851182
}
11861183
#endif
11871184

1185+
#ifdef CONFIG_PM
11881186
static int tegra_slink_runtime_suspend(struct device *dev)
11891187
{
11901188
struct spi_master *master = dev_get_drvdata(dev);
@@ -1210,6 +1208,7 @@ static int tegra_slink_runtime_resume(struct device *dev)
12101208
}
12111209
return 0;
12121210
}
1211+
#endif /* CONFIG_PM */
12131212

12141213
static const struct dev_pm_ops slink_pm_ops = {
12151214
SET_RUNTIME_PM_OPS(tegra_slink_runtime_suspend,

0 commit comments

Comments
 (0)