Skip to content
Snippets Groups Projects
Commit e44a45ae authored by David Brownell's avatar David Brownell Committed by Linus Torvalds
Browse files

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: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c1a13ff5
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment