Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 56906
b: refs/heads/master
c: be32479
h: refs/heads/master
v: v3
  • Loading branch information
Akinobu Mita authored and Linus Torvalds committed May 24, 2007
1 parent 5ddd387 commit 91ce76e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e578e9a1cc8a5983d87126d5877e305d3189f1b9
refs/heads/master: be324797d9b2a10f767e89dfbd880c735249bef9
14 changes: 7 additions & 7 deletions trunk/drivers/message/i2o/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/workqueue.h>
#include <linux/string.h>
#include <linux/slab.h>
#include <linux/log2.h>
#include "core.h"

#define OSM_NAME "i2o"
Expand Down Expand Up @@ -260,7 +261,7 @@ void i2o_driver_notify_controller_add_all(struct i2o_controller *c)
int i;
struct i2o_driver *drv;

for (i = 0; i < I2O_MAX_DRIVERS; i++) {
for (i = 0; i < i2o_max_drivers; i++) {
drv = i2o_drivers[i];

if (drv)
Expand All @@ -280,7 +281,7 @@ void i2o_driver_notify_controller_remove_all(struct i2o_controller *c)
int i;
struct i2o_driver *drv;

for (i = 0; i < I2O_MAX_DRIVERS; i++) {
for (i = 0; i < i2o_max_drivers; i++) {
drv = i2o_drivers[i];

if (drv)
Expand All @@ -299,7 +300,7 @@ void i2o_driver_notify_device_add_all(struct i2o_device *i2o_dev)
int i;
struct i2o_driver *drv;

for (i = 0; i < I2O_MAX_DRIVERS; i++) {
for (i = 0; i < i2o_max_drivers; i++) {
drv = i2o_drivers[i];

if (drv)
Expand All @@ -318,7 +319,7 @@ void i2o_driver_notify_device_remove_all(struct i2o_device *i2o_dev)
int i;
struct i2o_driver *drv;

for (i = 0; i < I2O_MAX_DRIVERS; i++) {
for (i = 0; i < i2o_max_drivers; i++) {
drv = i2o_drivers[i];

if (drv)
Expand All @@ -340,16 +341,15 @@ int __init i2o_driver_init(void)
spin_lock_init(&i2o_drivers_lock);

if ((i2o_max_drivers < 2) || (i2o_max_drivers > 64) ||
((i2o_max_drivers ^ (i2o_max_drivers - 1)) !=
(2 * i2o_max_drivers - 1))) {
!is_power_of_2(i2o_max_drivers)) {
osm_warn("max_drivers set to %d, but must be >=2 and <= 64 and "
"a power of 2\n", i2o_max_drivers);
i2o_max_drivers = I2O_MAX_DRIVERS;
}
osm_info("max drivers = %d\n", i2o_max_drivers);

i2o_drivers =
kzalloc(i2o_max_drivers * sizeof(*i2o_drivers), GFP_KERNEL);
kcalloc(i2o_max_drivers, sizeof(*i2o_drivers), GFP_KERNEL);
if (!i2o_drivers)
return -ENOMEM;

Expand Down

0 comments on commit 91ce76e

Please sign in to comment.