spi: pxa2xx: Remove timeout field from struct chip_data
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 17 Apr 2024 10:54:35 +0000 (13:54 +0300)
committerMark Brown <broonie@kernel.org>
Fri, 3 May 2024 02:11:37 +0000 (11:11 +0900)
The timeout field is used only once and assigned to a predefined
constant. Replace all that by using the constant directly.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20240417110334.2671228-9-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-pxa2xx.c
drivers/spi/spi-pxa2xx.h

index 3ba0f5816f7fe4df03caa55058ea12cd10fac5d2..030afb17e6062853bd42e1b250029cffa99477d8 100644 (file)
@@ -1058,7 +1058,7 @@ static int pxa2xx_spi_transfer_one(struct spi_controller *controller,
                pxa_ssp_disable(drv_data->ssp);
 
        if (!pxa25x_ssp_comp(drv_data))
-               pxa2xx_spi_write(drv_data, SSTO, chip->timeout);
+               pxa2xx_spi_write(drv_data, SSTO, TIMOUT_DFLT);
 
        /* First set CR1 without interrupt and service enables */
        pxa2xx_spi_update(drv_data, SSCR1, change_mask, cr1);
@@ -1200,8 +1200,6 @@ static int setup(struct spi_device *spi)
                chip = kzalloc(sizeof(struct chip_data), GFP_KERNEL);
                if (!chip)
                        return -ENOMEM;
-
-               chip->timeout = TIMOUT_DFLT;
        }
 
        chip->cr1 = 0;
index 10294ef209d989cc05a129f118813ca7ea178847..5f741bb3024095b6afaae7d7de62411ad8a1d7ba 100644 (file)
@@ -78,7 +78,6 @@ struct driver_data {
 struct chip_data {
        u32 cr1;
        u32 dds_rate;
-       u32 timeout;
        u32 threshold;
        u16 lpss_rx_threshold;
        u16 lpss_tx_threshold;