Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a4dd778 authored by Domen Puncer's avatar Domen Puncer Committed by Linus Torvalds
Browse files

spi: fix spidev for >sizeof(long)/32 devices



find_first_zero_bit accepts number of bits, not longs.

Signed-off-by: default avatarDomen Puncer <domen.puncer@telargo.com>
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent bb33ed63
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -484,7 +484,7 @@ static int spidev_probe(struct spi_device *spi)
	 * Reusing minors is fine so long as udev or mdev is working.
	 */
	mutex_lock(&device_list_lock);
	minor = find_first_zero_bit(minors, ARRAY_SIZE(minors));
	minor = find_first_zero_bit(minors, N_SPI_MINORS);
	if (minor < N_SPI_MINORS) {
		spidev->dev.parent = &spi->dev;
		spidev->dev.class = &spidev_class;