aboutsummaryrefslogtreecommitdiff
path: root/drivers/s390/cio/blacklist.c
diff options
context:
space:
mode:
authorCornelia Huck <huckc@de.ibm.com>2006-01-06 00:19:26 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 08:33:52 -0800
commit3b793060e768197d525e892fd1f84dbc8767cada (patch)
tree94b3860f2a5324effb71d2c09aac9ff55e02dcb2 /drivers/s390/cio/blacklist.c
parent88fbf18399bde8f2900cf932acd40733dfa1effa (diff)
[PATCH] s390: Fix missing release function and cosmetic changes
- Use kzalloc() in blacklist.c. - Kill unwanted casts in blacklist.c. - Provide release function for struct channel_subsystem. Signed-off-by: Cornelia Huck <huckc@de.ibm.com> Cc: 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/blacklist.c')
-rw-r--r--drivers/s390/cio/blacklist.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/s390/cio/blacklist.c b/drivers/s390/cio/blacklist.c
index 2d444cb2fdf..daf21e03b21 100644
--- a/drivers/s390/cio/blacklist.c
+++ b/drivers/s390/cio/blacklist.c
@@ -299,10 +299,9 @@ cio_ignore_proc_seq_start(struct seq_file *s, loff_t *offset)
if (*offset >= (__MAX_SUBCHANNEL + 1) * (__MAX_SSID + 1))
return NULL;
- iter = kmalloc(sizeof(struct ccwdev_iter), GFP_KERNEL);
+ iter = kzalloc(sizeof(struct ccwdev_iter), GFP_KERNEL);
if (!iter)
return ERR_PTR(-ENOMEM);
- memset(iter, 0, sizeof(struct ccwdev_iter));
iter->ssid = *offset / (__MAX_SUBCHANNEL + 1);
iter->devno = *offset % (__MAX_SUBCHANNEL + 1);
return iter;
@@ -322,7 +321,7 @@ cio_ignore_proc_seq_next(struct seq_file *s, void *it, loff_t *offset)
if (*offset >= (__MAX_SUBCHANNEL + 1) * (__MAX_SSID + 1))
return NULL;
- iter = (struct ccwdev_iter *)it;
+ iter = it;
if (iter->devno == __MAX_SUBCHANNEL) {
iter->devno = 0;
iter->ssid++;
@@ -339,7 +338,7 @@ cio_ignore_proc_seq_show(struct seq_file *s, void *it)
{
struct ccwdev_iter *iter;
- iter = (struct ccwdev_iter *)it;
+ iter = it;
if (!is_blacklisted(iter->ssid, iter->devno))
/* Not blacklisted, nothing to output. */
return 0;