From: Marc Kleine-Budde Date: Thu, 19 Mar 2026 16:55:35 +0000 (+0100) Subject: spi: spi-fsl-lpspi: adapt to kernel coding style X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8292eded59980eb2be64a22819885ab808f03440;p=thirdparty%2Flinux.git spi: spi-fsl-lpspi: adapt to kernel coding style Adapt the driver to current kernel coding style standards. Signed-off-by: Marc Kleine-Budde Link: https://patch.msgid.link/20260319-spi-fsl-lpspi-cleanups-v2-1-02b56c5d44a8@pengutronix.de Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c index b361c1bb3e431..989d0ffddc255 100644 --- a/drivers/spi/spi-fsl-lpspi.c +++ b/drivers/spi/spi-fsl-lpspi.c @@ -112,8 +112,8 @@ struct fsl_lpspi_data { void *rx_buf; const void *tx_buf; - void (*tx)(struct fsl_lpspi_data *); - void (*rx)(struct fsl_lpspi_data *); + void (*tx)(struct fsl_lpspi_data *fsl_lpspi); + void (*rx)(struct fsl_lpspi_data *fsl_lpspi); u32 remain; u8 watermark; @@ -271,8 +271,9 @@ static void fsl_lpspi_write_tx_fifo(struct fsl_lpspi_data *fsl_lpspi) } fsl_lpspi_intctrl(fsl_lpspi, IER_FCIE); - } else + } else { fsl_lpspi_intctrl(fsl_lpspi, IER_TDIE); + } } static void fsl_lpspi_read_rx_fifo(struct fsl_lpspi_data *fsl_lpspi) @@ -348,11 +349,10 @@ static int fsl_lpspi_set_bitrate(struct fsl_lpspi_data *fsl_lpspi) return -EINVAL; } - if (config.speed_hz > perclk_rate / 2) { + if (config.speed_hz > perclk_rate / 2) div = 2; - } else { + else div = DIV_ROUND_UP(perclk_rate, config.speed_hz); - } for (prescale = 0; prescale <= prescale_max; prescale++) { scldiv = div / (1 << prescale) - 2;