Skip to content

Commit

Permalink
spi: fix spidev for >sizeof(long)/32 devices
Browse files Browse the repository at this point in the history
find_first_zero_bit accepts number of bits, not longs.

Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Domen Puncer authored and Linus Torvalds committed May 17, 2007
1 parent bb33ed6 commit 0a4dd77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spidev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0a4dd77

Please sign in to comment.