]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/s390/cio/cmf.c
[PATCH] s390: multiple subchannel sets support
[linux-2.6-omap-h63xx.git] / drivers / s390 / cio / cmf.c
index 8cc4f1a940dcde952f6aafb124762185fb77fdeb..0b03714e696a12c7960a54b1164b7efcbdedcbe7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/s390/cio/cmf.c ($Revision: 1.16 $)
+ * linux/drivers/s390/cio/cmf.c ($Revision: 1.19 $)
  *
  * Linux on zSeries Channel Measurement Facility support
  *
 #include <linux/list.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
+#include <linux/slab.h>
+#include <linux/timex.h>       /* get_clock() */
 
 #include <asm/ccwdev.h>
 #include <asm/cio.h>
 #include <asm/cmb.h>
+#include <asm/div64.h>
 
 #include "cio.h"
 #include "css.h"
@@ -175,7 +178,7 @@ set_schib(struct ccw_device *cdev, u32 mme, int mbfc, unsigned long address)
        /* msch can silently fail, so do it again if necessary */
        for (retry = 0; retry < 3; retry++) {
                /* prepare schib */
-               stsch(sch->irq, schib);
+               stsch(sch->schid, schib);
                schib->pmcw.mme  = mme;
                schib->pmcw.mbfc = mbfc;
                /* address can be either a block address or a block index */
@@ -185,7 +188,7 @@ set_schib(struct ccw_device *cdev, u32 mme, int mbfc, unsigned long address)
                        schib->pmcw.mbi = address;
 
                /* try to submit it */
-               switch(ret = msch_err(sch->irq, schib)) {
+               switch(ret = msch_err(sch->schid, schib)) {
                        case 0:
                                break;
                        case 1:
@@ -199,7 +202,7 @@ set_schib(struct ccw_device *cdev, u32 mme, int mbfc, unsigned long address)
                                ret = -EINVAL;
                                break;
                }
-               stsch(sch->irq, schib); /* restore the schib */
+               stsch(sch->schid, schib); /* restore the schib */
 
                if (ret)
                        break;
@@ -639,8 +642,7 @@ static void
 free_cmbe (struct ccw_device *cdev)
 {
        spin_lock_irq(cdev->ccwlock);
-       if (cdev->private->cmb)
-               kfree(cdev->private->cmb);
+       kfree(cdev->private->cmb);
        cdev->private->cmb = NULL;
        spin_unlock_irq(cdev->ccwlock);