summaryrefslogtreecommitdiffstats
path: root/drivers/char/snsc_event.c
diff options
context:
space:
mode:
authorJes Sorensen <jes@sgi.com>2006-03-23 12:00:49 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-23 16:38:15 +0100
commit40953ed87dd68742de0dd1bdecdcdfebfe1d69ae (patch)
treec5faa3efe1e3f8381d5d8674f068556abb9400d8 /drivers/char/snsc_event.c
parent[PATCH] fat_lock is used as a mutex, convert it to using the new mutex primitive (diff)
downloadlinux-40953ed87dd68742de0dd1bdecdcdfebfe1d69ae.tar.xz
linux-40953ed87dd68742de0dd1bdecdcdfebfe1d69ae.zip
[PATCH] snsc kmalloc2kzalloc
Change driver to use kzalloc rather than kmalloc+memset Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to '')
-rw-r--r--drivers/char/snsc_event.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/char/snsc_event.c b/drivers/char/snsc_event.c
index a4fa507eed9e..e234d50e142a 100644
--- a/drivers/char/snsc_event.c
+++ b/drivers/char/snsc_event.c
@@ -287,7 +287,7 @@ scdrv_event_init(struct sysctl_data_s *scd)
{
int rv;
- event_sd = kmalloc(sizeof (struct subch_data_s), GFP_KERNEL);
+ event_sd = kzalloc(sizeof (struct subch_data_s), GFP_KERNEL);
if (event_sd == NULL) {
printk(KERN_WARNING "%s: couldn't allocate subchannel info"
" for event monitoring\n", __FUNCTION__);
@@ -295,7 +295,6 @@ scdrv_event_init(struct sysctl_data_s *scd)
}
/* initialize subch_data_s fields */
- memset(event_sd, 0, sizeof (struct subch_data_s));
event_sd->sd_nasid = scd->scd_nasid;
spin_lock_init(&event_sd->sd_rlock);
@@ -321,5 +320,3 @@ scdrv_event_init(struct sysctl_data_s *scd)
return;
}
}
-
-