Merge tag 'spi-fix-v5.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi fixes from Mark BrownL
"This contains a couple of fixes, one fix for handling of zero length
transfers on Rockchip devices and a warning fix which will conflict
with a version you did but cleans up some extra unneeded forward
declarations as well which seems a bit neater"

* tag 'spi-fix-v5.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
spi: tegra20-slink: Declare runtime suspend and resume functions conditionally
spi: rockchip: handle zero length transfers without timing out

+10 -5
+6
drivers/spi/spi-rockchip.c
··· 600 600 int ret; 601 601 bool use_dma; 602 602 603 + /* Zero length transfers won't trigger an interrupt on completion */ 604 + if (!xfer->len) { 605 + spi_finalize_current_transfer(ctlr); 606 + return 1; 607 + } 608 + 603 609 WARN_ON(readl_relaxed(rs->regs + ROCKCHIP_SPI_SSIENR) && 604 610 (readl_relaxed(rs->regs + ROCKCHIP_SPI_SR) & SR_BUSY)); 605 611
+4 -5
drivers/spi/spi-tegra20-slink.c
··· 204 204 struct dma_async_tx_descriptor *tx_dma_desc; 205 205 }; 206 206 207 - static int tegra_slink_runtime_suspend(struct device *dev); 208 - static int tegra_slink_runtime_resume(struct device *dev); 209 - 210 207 static inline u32 tegra_slink_readl(struct tegra_slink_data *tspi, 211 208 unsigned long reg) 212 209 { ··· 1182 1185 } 1183 1186 #endif 1184 1187 1185 - static int __maybe_unused tegra_slink_runtime_suspend(struct device *dev) 1188 + #ifdef CONFIG_PM 1189 + static int tegra_slink_runtime_suspend(struct device *dev) 1186 1190 { 1187 1191 struct spi_master *master = dev_get_drvdata(dev); 1188 1192 struct tegra_slink_data *tspi = spi_master_get_devdata(master); ··· 1195 1197 return 0; 1196 1198 } 1197 1199 1198 - static int __maybe_unused tegra_slink_runtime_resume(struct device *dev) 1200 + static int tegra_slink_runtime_resume(struct device *dev) 1199 1201 { 1200 1202 struct spi_master *master = dev_get_drvdata(dev); 1201 1203 struct tegra_slink_data *tspi = spi_master_get_devdata(master); ··· 1208 1210 } 1209 1211 return 0; 1210 1212 } 1213 + #endif /* CONFIG_PM */ 1211 1214 1212 1215 static const struct dev_pm_ops slink_pm_ops = { 1213 1216 SET_RUNTIME_PM_OPS(tegra_slink_runtime_suspend,