]> git.ipfire.org Git - thirdparty/linux.git/commit
spi: keep track of number of chipselects in spi_device
authorJonas Gorski <jonas.gorski@gmail.com>
Mon, 15 Sep 2025 18:37:20 +0000 (20:37 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 22 Sep 2025 08:29:41 +0000 (09:29 +0100)
commit099f942182e3695554cba44e4bafb08a4111b50f
tree4459749346ceb7ca82e1a58e13abcfb96416f9a1
parent188f63235bcdd207646773a8739387d85347ed76
spi: keep track of number of chipselects in spi_device

There are several places where we need to iterate over a device's
chipselect. To be able to do it efficiently, store the number of
chipselects in spi_device, like we do for controllers.

Since we now use a device supplied value, add a check to make sure it
isn't more than we can support.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Link: https://patch.msgid.link/20250915183725.219473-3-jonas.gorski@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi.c
include/linux/spi/spi.h