Unverified Commit 8292eded authored by Marc Kleine-Budde's avatar Marc Kleine-Budde Committed by Mark Brown
Browse files

spi: spi-fsl-lpspi: adapt to kernel coding style



Adapt the driver to current kernel coding style standards.

Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Link: https://patch.msgid.link/20260319-spi-fsl-lpspi-cleanups-v2-1-02b56c5d44a8@pengutronix.de


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent abe572f6
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -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,9 +271,10 @@ 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;