Skip to contentSkip to conversation

spi: dw: Make dw_spi_update_config()

PATCH In review Jisheng Zhang 2 participants 2 messages Oct 10 – Oct 13 SPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spi: dw: Make dw_spi_update_config()

After commit da0a672268b3 ("spi: dw: Remove not-going-to-be-supported code for Baikal SoC"), no users of dw_spi_update_config() any more. Unexport it and make it static. We can also move two structure definitions to spi-dw-core.c at the same time.

---
 drivers/spi/spi-dw-core.c | 21 ++++++++++++++++++---
 drivers/spi/spi-dw.h      | 18 ------------------
 2 files changed, 18 insertions(+), 21 deletions(-)
drivers/spi/spi-dw-core.c +18 -3
index 1f0e93800908..2d671e31413e 100644
@@ -32,6 +32,22 @@ struct dw_spi_chip_data {
 	u32 rx_sample_dly;	/* RX sample delay */
 };
 
+/* Slave spi_transfer/spi_mem_op related */
+struct dw_spi_cfg {
+	u8 tmode;
+	u8 dfs;
+	u32 ndf;
+	u32 freq;
+	u8 spi_frf;
+};
+
+struct dw_spi_enh_cfg {
+	u8 wait_c;
+	u8 inst_l;
+	u8 addr_l;
+	u8 trans_t;
+};
+
 #ifdef CONFIG_DEBUG_FS
 
 #define DW_SPI_DBGFS_REG(_name, _off)	\
@@ -342,8 +358,8 @@ static u32 dw_spi_prepare_cr0(struct dw_spi *dws, struct spi_device *spi)
 	return cr0;
 }
 
-void dw_spi_update_config(struct dw_spi *dws, struct spi_device *spi,
-			  struct dw_spi_cfg *cfg, struct dw_spi_enh_cfg *enh_cfg)
+static void dw_spi_update_config(struct dw_spi *dws, struct spi_device *spi,
+				 struct dw_spi_cfg *cfg, struct dw_spi_enh_cfg *enh_cfg)
 {
 	struct dw_spi_chip_data *chip = spi_get_ctldata(spi);
 	u32 cr0 = chip->cr0;
@@ -406,7 +422,6 @@ void dw_spi_update_config(struct dw_spi *dws, struct spi_device *spi,
 		dw_writel(dws, DW_SPI_SPI_CTRLR0, cr0);
 	}
 }
-EXPORT_SYMBOL_NS_GPL(dw_spi_update_config, "SPI_DW_CORE");
 
 static void dw_spi_irq_setup(struct dw_spi *dws)
 {
drivers/spi/spi-dw.h +0 -18
index bfdf371bcacb..c16225c5c887 100644
@@ -158,22 +158,6 @@
 #define DW_SPI_GET_BYTE(_val, _idx) \
 	((_val) >> (BITS_PER_BYTE * (_idx)) & 0xff)
 
-/* Slave spi_transfer/spi_mem_op related */
-struct dw_spi_cfg {
-	u8 tmode;
-	u8 dfs;
-	u32 ndf;
-	u32 freq;
-	u8 spi_frf;
-};
-
-struct dw_spi_enh_cfg {
-	u8 wait_c;
-	u8 inst_l;
-	u8 addr_l;
-	u8 trans_t;
-};
-
 struct dw_spi;
 struct dw_spi_dma_ops {
 	int (*dma_init)(struct device *dev, struct dw_spi *dws);
@@ -345,8 +329,6 @@ static inline void dw_spi_shutdown_chip(struct dw_spi *dws)
 }
 
 extern void dw_spi_set_cs(struct spi_device *spi, bool enable);
-extern void dw_spi_update_config(struct dw_spi *dws, struct spi_device *spi,
-				 struct dw_spi_cfg *cfg, struct dw_spi_enh_cfg *enh_cfg);
 extern int dw_spi_check_status(struct dw_spi *dws, bool raw);
 extern int dw_spi_add_controller(struct device *dev, struct dw_spi *dws);
 extern void dw_spi_remove_controller(struct dw_spi *dws);
Signature · 1 line
2.53.0
maintainer
#1 lore raw
Quoted 1 line · Jisheng Zhang

spi: dw: Make dw_spi_update_config()

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-7.4

Thanks!

[1/1] spi: dw: Make dw_spi_update_config()

      https://git.kernel.org/broonie/misc/c/306439eed9ea

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark