summaryrefslogtreecommitdiffstats
path: root/drivers/message/i2o/driver.c
diff options
context:
space:
mode:
authorMarkus Lidel <Markus.Lidel@shadowconnect.com>2006-01-06 00:19:33 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 08:33:54 -0800
commitf6ed39a6e1a88240eec629a3da17c3a47ada3b89 (patch)
treeb19fee742b48865b94bb26ed4428ca00a1a95b2c /drivers/message/i2o/driver.c
parent2e1973a3cd0b9fe31469be62df3583bdc5a34f51 (diff)
downloadblackbird-op-linux-f6ed39a6e1a88240eec629a3da17c3a47ada3b89.tar.gz
blackbird-op-linux-f6ed39a6e1a88240eec629a3da17c3a47ada3b89.zip
[PATCH] I2O: Optimizing
- make i2o_iop_free() static inline (from Adrian Bunk) - changed kmalloc() + memset(0) into kzalloc() Signed-off-by: Markus Lidel <Markus.Lidel@shadowconnect.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/message/i2o/driver.c')
-rw-r--r--drivers/message/i2o/driver.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/message/i2o/driver.c b/drivers/message/i2o/driver.c
index 45f4119a75f6..64130227574f 100644
--- a/drivers/message/i2o/driver.c
+++ b/drivers/message/i2o/driver.c
@@ -217,10 +217,9 @@ int i2o_driver_dispatch(struct i2o_controller *c, u32 m)
/* cut of header from message size (in 32-bit words) */
size = (le32_to_cpu(msg->u.head[0]) >> 16) - 5;
- evt = kmalloc(size * 4 + sizeof(*evt), GFP_ATOMIC);
+ evt = kzalloc(size * 4 + sizeof(*evt), GFP_ATOMIC);
if (!evt)
return -ENOMEM;
- memset(evt, 0, size * 4 + sizeof(*evt));
evt->size = size;
evt->tcntxt = le32_to_cpu(msg->u.s.tcntxt);
@@ -348,12 +347,10 @@ int __init i2o_driver_init(void)
osm_info("max drivers = %d\n", i2o_max_drivers);
i2o_drivers =
- kmalloc(i2o_max_drivers * sizeof(*i2o_drivers), GFP_KERNEL);
+ kzalloc(i2o_max_drivers * sizeof(*i2o_drivers), GFP_KERNEL);
if (!i2o_drivers)
return -ENOMEM;
- memset(i2o_drivers, 0, i2o_max_drivers * sizeof(*i2o_drivers));
-
rc = bus_register(&i2o_bus_type);
if (rc < 0)
OpenPOWER on IntegriCloud