aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-stm32.c
diff options
context:
space:
mode:
authorDavid Lechner <[email protected]>2024-02-06 20:06:46 +0000
committerMark Brown <[email protected]>2024-02-07 10:05:54 +0000
commitc0c0293cf7a0f21ef461956d44e4add718574f3f (patch)
tree7ade968950a8db36e6fd53b4cecdbdddd7d1baee /drivers/spi/spi-stm32.c
parentspi: fsl-dspi: A couple of error handling (diff)
downloadkernel-c0c0293cf7a0f21ef461956d44e4add718574f3f.tar.gz
kernel-c0c0293cf7a0f21ef461956d44e4add718574f3f.zip
spi: drop gpf arg from __spi_split_transfer_maxsize()
The __spi_split_transfer_maxsize() function has a gpf argument to allow callers to specify the type of memory allocation that needs to be used. However, this function only allocates struct spi_transfer and is not intended to be used from atomic contexts so this type should always be GFP_KERNEL, so we can just drop the argument. Some callers of these functions also passed GFP_DMA, but since only struct spi_transfer is allocated and not any tx/rx buffers, this is not actually necessary and is removed in this commit. Signed-off-by: David Lechner <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'drivers/spi/spi-stm32.c')
-rw-r--r--drivers/spi/spi-stm32.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c
index e61302ef3c21..c32e57bb38bd 100644
--- a/drivers/spi/spi-stm32.c
+++ b/drivers/spi/spi-stm32.c
@@ -1170,9 +1170,7 @@ static int stm32_spi_prepare_msg(struct spi_controller *ctrl,
if (spi->cfg->set_number_of_data) {
int ret;
- ret = spi_split_transfers_maxwords(ctrl, msg,
- spi->t_size_max,
- GFP_KERNEL | GFP_DMA);
+ ret = spi_split_transfers_maxwords(ctrl, msg, spi->t_size_max);
if (ret)
return ret;
}