提交 0a4dd778 编写于 作者: D Domen Puncer 提交者: Linus Torvalds

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

find_first_zero_bit accepts number of bits, not longs.
Signed-off-by: NDomen Puncer <domen.puncer@telargo.com>
Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 bb33ed63
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册