diff options
author | David Brownell <david-b@pacbell.net> | 2007-06-03 16:50:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-06-04 16:25:09 -0400 |
commit | e44a45ae7b7f7c7a4ebd6aa39b703bf2b97fe848 (patch) | |
tree | 883ba41f63b5c001d28b57ce8fc592a9bb2fa3c7 /drivers/spi | |
parent | c1a13ff57ab1ce52a0aae9984594dbfcfbaf68c0 (diff) |
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 <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 'drivers/spi')
-rw-r--r-- | drivers/spi/spi.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); | |||
411 | */ | 411 | */ |
412 | int spi_register_master(struct spi_master *master) | 412 | int spi_register_master(struct spi_master *master) |
413 | { | 413 | { |
414 | static atomic_t dyn_bus_id = ATOMIC_INIT((1<<16) - 1); | 414 | static atomic_t dyn_bus_id = ATOMIC_INIT((1<<15) - 1); |
415 | struct device *dev = master->cdev.dev; | 415 | struct device *dev = master->cdev.dev; |
416 | int status = -ENODEV; | 416 | int status = -ENODEV; |
417 | int dynamic = 0; | 417 | int dynamic = 0; |