Commit 82cd0e84 authored by Akinobu Mita's avatar Akinobu Mita Committed by Linus Torvalds

i2o: eliminate a peculiar constraint on i2o_max_drivers

There is no reason i2o_max_drivers must be a power of two.  This patch
eliminates such a constraint.

Cc: Markus Lidel <Markus.Lidel@shadowconnect.com>
Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent be324797
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include <linux/workqueue.h> #include <linux/workqueue.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/log2.h>
#include "core.h" #include "core.h"
#define OSM_NAME "i2o" #define OSM_NAME "i2o"
...@@ -340,10 +339,9 @@ int __init i2o_driver_init(void) ...@@ -340,10 +339,9 @@ int __init i2o_driver_init(void)
spin_lock_init(&i2o_drivers_lock); spin_lock_init(&i2o_drivers_lock);
if ((i2o_max_drivers < 2) || (i2o_max_drivers > 64) || if ((i2o_max_drivers < 2) || (i2o_max_drivers > 64)) {
!is_power_of_2(i2o_max_drivers)) { osm_warn("max_drivers set to %d, but must be >=2 and <= 64\n",
osm_warn("max_drivers set to %d, but must be >=2 and <= 64 and " i2o_max_drivers);
"a power of 2\n", i2o_max_drivers);
i2o_max_drivers = I2O_MAX_DRIVERS; i2o_max_drivers = I2O_MAX_DRIVERS;
} }
osm_info("max drivers = %d\n", i2o_max_drivers); osm_info("max drivers = %d\n", i2o_max_drivers);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment