From e44a45ae7b7f7c7a4ebd6aa39b703bf2b97fe848 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Sun, 3 Jun 2007 13:50:40 -0700 Subject: [PATCH] SPI dynamic busid generation bugfix Fix SPI dynamic bus ID assignment to start at 2^15-1 rather than a negative number. Valid bus ids are supposed to be positive, and are (now) stored in an 's16' value. Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/spi/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index c3219b29b5ac..4831edbae2d5 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -411,7 +411,7 @@ EXPORT_SYMBOL_GPL(spi_alloc_master); */ int spi_register_master(struct spi_master *master) { - static atomic_t dyn_bus_id = ATOMIC_INIT((1<<16) - 1); + static atomic_t dyn_bus_id = ATOMIC_INIT((1<<15) - 1); struct device *dev = master->cdev.dev; int status = -ENODEV; int dynamic = 0; -- 2.30.2