spi: dw: remove unused dw_spi_chip handling
authorClement Leger <cleger@kalray.eu>
Thu, 16 Apr 2020 11:09:15 +0000 (13:09 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 16 Apr 2020 13:28:32 +0000 (14:28 +0100)
The path of code using this struct is unused since there is no more user
of this. Remove code and struct definition.

Signed-off-by: Clement Leger <cleger@kalray.eu>
Link: https://lore.kernel.org/r/20200416110916.22633-1-cleger@kalray.eu
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-dw.c
drivers/spi/spi-dw.h

index 31e3f86..fda8d43 100644 (file)
@@ -399,7 +399,6 @@ static void dw_spi_handle_err(struct spi_controller *master,
 /* This may be called twice for each spi dev */
 static int dw_spi_setup(struct spi_device *spi)
 {
-       struct dw_spi_chip *chip_info = NULL;
        struct chip_data *chip;
 
        /* Only alloc on first setup */
@@ -411,21 +410,6 @@ static int dw_spi_setup(struct spi_device *spi)
                spi_set_ctldata(spi, chip);
        }
 
-       /*
-        * Protocol drivers may change the chip settings, so...
-        * if chip_info exists, use it
-        */
-       chip_info = spi->controller_data;
-
-       /* chip_info doesn't always exist */
-       if (chip_info) {
-               if (chip_info->cs_control)
-                       chip->cs_control = chip_info->cs_control;
-
-               chip->poll_mode = chip_info->poll_mode;
-               chip->type = chip_info->type;
-       }
-
        chip->tmode = SPI_TMOD_TR;
 
        return 0;
index 1bf5713..44ef181 100644 (file)
@@ -235,18 +235,6 @@ static inline void spi_shutdown_chip(struct dw_spi *dws)
        spi_set_clk(dws, 0);
 }
 
-/*
- * Each SPI slave device to work with dw_api controller should
- * has such a structure claiming its working mode (poll or PIO/DMA),
- * which can be save in the "controller_data" member of the
- * struct spi_device.
- */
-struct dw_spi_chip {
-       u8 poll_mode;   /* 1 for controller polling mode */
-       u8 type;        /* SPI/SSP/MicroWire */
-       void (*cs_control)(u32 command);
-};
-
 extern void dw_spi_set_cs(struct spi_device *spi, bool enable);
 extern int dw_spi_add_host(struct device *dev, struct dw_spi *dws);
 extern void dw_spi_remove_host(struct dw_spi *dws);