diff options
author | Jan Glauber <jang@linux.vnet.ibm.com> | 2010-05-17 10:00:16 +0200 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2010-05-17 10:00:17 +0200 |
commit | 5382fe11d90e3ed9602ce655e523852e3dbf3e35 (patch) | |
tree | 0fa08681940ae976563eb1e5480a8568a1c762e7 /drivers/s390/cio/qdio_setup.c | |
parent | f3eb20fafdc10aea0fb13b113ac3b9a3dc9a5dc6 (diff) | |
download | linux-5382fe11d90e3ed9602ce655e523852e3dbf3e35.tar.gz linux-5382fe11d90e3ed9602ce655e523852e3dbf3e35.tar.bz2 linux-5382fe11d90e3ed9602ce655e523852e3dbf3e35.zip |
[S390] qdio: remove memset hack
Remove memset hack that relied on the layout of struct qdio_q
to avoid deletion of the slib pointer.
Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/qdio_setup.c')
-rw-r--r-- | drivers/s390/cio/qdio_setup.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/s390/cio/qdio_setup.c b/drivers/s390/cio/qdio_setup.c index 7f4a75465140..6326b67c45d2 100644 --- a/drivers/s390/cio/qdio_setup.c +++ b/drivers/s390/cio/qdio_setup.c @@ -106,10 +106,12 @@ int qdio_allocate_qs(struct qdio_irq *irq_ptr, int nr_input_qs, int nr_output_qs static void setup_queues_misc(struct qdio_q *q, struct qdio_irq *irq_ptr, qdio_handler_t *handler, int i) { - /* must be cleared by every qdio_establish */ - memset(q, 0, ((char *)&q->slib) - ((char *)q)); - memset(q->slib, 0, PAGE_SIZE); + struct slib *slib = q->slib; + /* queue must be cleared for qdio_establish */ + memset(q, 0, sizeof(*q)); + memset(slib, 0, PAGE_SIZE); + q->slib = slib; q->irq_ptr = irq_ptr; q->mask = 1 << (31 - i); q->nr = i; |