diff options
author | David Lechner <dlechner@baylibre.com> | 2024-02-06 14:06:46 -0600 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-02-07 10:05:54 +0000 |
commit | c0c0293cf7a0f21ef461956d44e4add718574f3f (patch) | |
tree | 7ade968950a8db36e6fd53b4cecdbdddd7d1baee /include/linux/spi | |
parent | b9c0b785ed4c410006b16525d559c3d834c62586 (diff) | |
download | linux-stable-c0c0293cf7a0f21ef461956d44e4add718574f3f.tar.gz linux-stable-c0c0293cf7a0f21ef461956d44e4add718574f3f.tar.bz2 linux-stable-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 <dlechner@baylibre.com>
Link: https://lore.kernel.org/r/20240206200648.1782234-1-dlechner@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/spi')
-rw-r--r-- | include/linux/spi/spi.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 29c3e4dd5d93..9339c8ed1f8f 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -1365,12 +1365,10 @@ struct spi_replaced_transfers { extern int spi_split_transfers_maxsize(struct spi_controller *ctlr, struct spi_message *msg, - size_t maxsize, - gfp_t gfp); + size_t maxsize); extern int spi_split_transfers_maxwords(struct spi_controller *ctlr, struct spi_message *msg, - size_t maxwords, - gfp_t gfp); + size_t maxwords); /*---------------------------------------------------------------------------*/ |