diff options
author | Markus Lidel <Markus.Lidel@shadowconnect.com> | 2006-01-06 03:19:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 11:33:54 -0500 |
commit | f6ed39a6e1a88240eec629a3da17c3a47ada3b89 (patch) | |
tree | b19fee742b48865b94bb26ed4428ca00a1a95b2c /drivers/message/i2o/device.c | |
parent | 2e1973a3cd0b9fe31469be62df3583bdc5a34f51 (diff) |
[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/device.c')
-rw-r--r-- | drivers/message/i2o/device.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/message/i2o/device.c b/drivers/message/i2o/device.c index 773b0a4cfe21..34976b26b265 100644 --- a/drivers/message/i2o/device.c +++ b/drivers/message/i2o/device.c | |||
@@ -195,12 +195,10 @@ static struct i2o_device *i2o_device_alloc(void) | |||
195 | { | 195 | { |
196 | struct i2o_device *dev; | 196 | struct i2o_device *dev; |
197 | 197 | ||
198 | dev = kmalloc(sizeof(*dev), GFP_KERNEL); | 198 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); |
199 | if (!dev) | 199 | if (!dev) |
200 | return ERR_PTR(-ENOMEM); | 200 | return ERR_PTR(-ENOMEM); |
201 | 201 | ||
202 | memset(dev, 0, sizeof(*dev)); | ||
203 | |||
204 | INIT_LIST_HEAD(&dev->list); | 202 | INIT_LIST_HEAD(&dev->list); |
205 | init_MUTEX(&dev->lock); | 203 | init_MUTEX(&dev->lock); |
206 | 204 | ||