diff options
author | Domen Puncer <domen@coderock.org> | 2007-05-16 08:57:05 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-17 06:19:15 +0200 |
commit | 0a4dd7783dfc62176a29cb349404180f24f46975 (patch) | |
tree | 9cd363f697114b5ade9821f5f4fd4f2f4e4b6976 /drivers/spi/spidev.c | |
parent | AFS: Fix afs_prepare_write() (diff) | |
download | linux-0a4dd7783dfc62176a29cb349404180f24f46975.tar.xz linux-0a4dd7783dfc62176a29cb349404180f24f46975.zip |
spi: fix spidev for >sizeof(long)/32 devices
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>
Diffstat (limited to '')
-rw-r--r-- | drivers/spi/spidev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index c0a6dce800a3..225d6b2f82dd 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c @@ -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; |