diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-03-24 06:15:31 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-24 10:33:18 -0500 |
commit | 88abaab4f9b08381e30e737980a1c49d6b524dfc (patch) | |
tree | d33aa82674c00c37cd293c9e888cff785880ce5a /drivers/s390/cio/device.c | |
parent | fb630517f0d0736ea73af07d6b357be9ad67e6f1 (diff) |
[PATCH] s390: kzalloc() conversion in drivers/s390
Convert all kmalloc + memset sequences in drivers/s390 to kzalloc usage.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/s390/cio/device.c')
-rw-r--r-- | drivers/s390/cio/device.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index afc4e88551ad..8e3053c2a451 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
@@ -826,17 +826,15 @@ io_subchannel_probe (struct subchannel *sch) | |||
826 | get_device(&cdev->dev); | 826 | get_device(&cdev->dev); |
827 | return 0; | 827 | return 0; |
828 | } | 828 | } |
829 | cdev = kmalloc (sizeof(*cdev), GFP_KERNEL); | 829 | cdev = kzalloc (sizeof(*cdev), GFP_KERNEL); |
830 | if (!cdev) | 830 | if (!cdev) |
831 | return -ENOMEM; | 831 | return -ENOMEM; |
832 | memset(cdev, 0, sizeof(struct ccw_device)); | 832 | cdev->private = kzalloc(sizeof(struct ccw_device_private), |
833 | cdev->private = kmalloc(sizeof(struct ccw_device_private), | ||
834 | GFP_KERNEL | GFP_DMA); | 833 | GFP_KERNEL | GFP_DMA); |
835 | if (!cdev->private) { | 834 | if (!cdev->private) { |
836 | kfree(cdev); | 835 | kfree(cdev); |
837 | return -ENOMEM; | 836 | return -ENOMEM; |
838 | } | 837 | } |
839 | memset(cdev->private, 0, sizeof(struct ccw_device_private)); | ||
840 | atomic_set(&cdev->private->onoff, 0); | 838 | atomic_set(&cdev->private->onoff, 0); |
841 | cdev->dev = (struct device) { | 839 | cdev->dev = (struct device) { |
842 | .parent = &sch->dev, | 840 | .parent = &sch->dev, |