Skip to content

Commit b3aa619

Browse files
Uwe Kleine-Königbroonie
authored andcommitted
spi: ppc4xx: Drop write-only variable
Since commit 24778be ("spi: convert drivers to use bits_per_word_mask") the bits_per_word variable is only written to. The check that was there before isn't needed any more as the spi core ensures that only 8 bit transfers are used, so the variable can go away together with all assignments to it. Fixes: 24778be ("spi: convert drivers to use bits_per_word_mask") Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent de4af89 commit b3aa619

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

drivers/spi/spi-ppc4xx.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,20 +168,15 @@ static int spi_ppc4xx_setupxfer(struct spi_device *spi, struct spi_transfer *t)
168168
int scr;
169169
u8 cdm = 0;
170170
u32 speed;
171-
u8 bits_per_word;
172171

173172
/* Start with the generic configuration for this device. */
174-
bits_per_word = spi->bits_per_word;
175173
speed = spi->max_speed_hz;
176174

177175
/*
178176
* Modify the configuration if the transfer overrides it. Do not allow
179177
* the transfer to overwrite the generic configuration with zeros.
180178
*/
181179
if (t) {
182-
if (t->bits_per_word)
183-
bits_per_word = t->bits_per_word;
184-
185180
if (t->speed_hz)
186181
speed = min(t->speed_hz, spi->max_speed_hz);
187182
}

0 commit comments

Comments
 (0)