Skip to content

Commit

Permalink
SPI dynamic busid generation bugfix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Brownell authored and Linus Torvalds committed Jun 4, 2007
1 parent c1a13ff commit e44a45a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi.c
Expand Up @@ -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;
Expand Down

0 comments on commit e44a45a

Please sign in to comment.