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 int ret; 601 bool use_dma; 602 603 WARN_ON(readl_relaxed(rs->regs + ROCKCHIP_SPI_SSIENR) && 604 (readl_relaxed(rs->regs + ROCKCHIP_SPI_SR) & SR_BUSY)); 605
··· 600 int ret; 601 bool use_dma; 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 + 609 WARN_ON(readl_relaxed(rs->regs + ROCKCHIP_SPI_SSIENR) && 610 (readl_relaxed(rs->regs + ROCKCHIP_SPI_SR) & SR_BUSY)); 611
+4 -5
drivers/spi/spi-tegra20-slink.c
··· 204 struct dma_async_tx_descriptor *tx_dma_desc; 205 }; 206 207 - static int tegra_slink_runtime_suspend(struct device *dev); 208 - static int tegra_slink_runtime_resume(struct device *dev); 209 - 210 static inline u32 tegra_slink_readl(struct tegra_slink_data *tspi, 211 unsigned long reg) 212 { ··· 1182 } 1183 #endif 1184 1185 - static int __maybe_unused tegra_slink_runtime_suspend(struct device *dev) 1186 { 1187 struct spi_master *master = dev_get_drvdata(dev); 1188 struct tegra_slink_data *tspi = spi_master_get_devdata(master); ··· 1195 return 0; 1196 } 1197 1198 - static int __maybe_unused tegra_slink_runtime_resume(struct device *dev) 1199 { 1200 struct spi_master *master = dev_get_drvdata(dev); 1201 struct tegra_slink_data *tspi = spi_master_get_devdata(master); ··· 1208 } 1209 return 0; 1210 } 1211 1212 static const struct dev_pm_ops slink_pm_ops = { 1213 SET_RUNTIME_PM_OPS(tegra_slink_runtime_suspend,
··· 204 struct dma_async_tx_descriptor *tx_dma_desc; 205 }; 206 207 static inline u32 tegra_slink_readl(struct tegra_slink_data *tspi, 208 unsigned long reg) 209 { ··· 1185 } 1186 #endif 1187 1188 + #ifdef CONFIG_PM 1189 + static int tegra_slink_runtime_suspend(struct device *dev) 1190 { 1191 struct spi_master *master = dev_get_drvdata(dev); 1192 struct tegra_slink_data *tspi = spi_master_get_devdata(master); ··· 1197 return 0; 1198 } 1199 1200 + static int tegra_slink_runtime_resume(struct device *dev) 1201 { 1202 struct spi_master *master = dev_get_drvdata(dev); 1203 struct tegra_slink_data *tspi = spi_master_get_devdata(master); ··· 1210 } 1211 return 0; 1212 } 1213 + #endif /* CONFIG_PM */ 1214 1215 static const struct dev_pm_ops slink_pm_ops = { 1216 SET_RUNTIME_PM_OPS(tegra_slink_runtime_suspend,