Skip to content

Commit 35bf074

Browse files
andy-shevbroonie
authored andcommitted
spi: pxa2xx: Remove timeout field from struct chip_data
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 <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 5c5de36 commit 35bf074

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

drivers/spi/spi-pxa2xx.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,7 @@ static int pxa2xx_spi_transfer_one(struct spi_controller *controller,
10581058
pxa_ssp_disable(drv_data->ssp);
10591059

10601060
if (!pxa25x_ssp_comp(drv_data))
1061-
pxa2xx_spi_write(drv_data, SSTO, chip->timeout);
1061+
pxa2xx_spi_write(drv_data, SSTO, TIMOUT_DFLT);
10621062

10631063
/* First set CR1 without interrupt and service enables */
10641064
pxa2xx_spi_update(drv_data, SSCR1, change_mask, cr1);
@@ -1200,8 +1200,6 @@ static int setup(struct spi_device *spi)
12001200
chip = kzalloc(sizeof(struct chip_data), GFP_KERNEL);
12011201
if (!chip)
12021202
return -ENOMEM;
1203-
1204-
chip->timeout = TIMOUT_DFLT;
12051203
}
12061204

12071205
chip->cr1 = 0;

drivers/spi/spi-pxa2xx.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ struct driver_data {
7878
struct chip_data {
7979
u32 cr1;
8080
u32 dds_rate;
81-
u32 timeout;
8281
u32 threshold;
8382
u16 lpss_rx_threshold;
8483
u16 lpss_tx_threshold;

0 commit comments

Comments
 (0)