From: Domen Puncer Date: Wed, 16 May 2007 06:57:05 +0000 (-0700) Subject: spi: fix spidev for >sizeof(long)/32 devices X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0a4dd7783dfc62176a29cb349404180f24f46975;p=openwrt%2Fstaging%2Fblogic.git spi: fix spidev for >sizeof(long)/32 devices find_first_zero_bit accepts number of bits, not longs. Signed-off-by: Domen Puncer Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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;