[S390] vmur: Invalid allocation sequence for vmur class
[safe/jmp/linux-2.6] / drivers / s390 / char / tape_3590.c
index 5a5bb97..418f72d 100644 (file)
@@ -2,7 +2,7 @@
  *  drivers/s390/char/tape_3590.c
  *    tape device discipline for 3590 tapes.
  *
- *    Copyright IBM Corp. 2001,2006
+ *    Copyright IBM Corp. 2001, 2009
  *    Author(s): Stefan Bader <shbader@de.ibm.com>
  *              Michael Holzheu <holzheu@de.ibm.com>
  *              Martin Schwidefsky <schwidefsky@de.ibm.com>
@@ -633,7 +633,7 @@ tape_3590_bread(struct tape_device *device, struct request *req)
        struct req_iterator iter;
 
        DBF_EVENT(6, "xBREDid:");
-       start_block = req->sector >> TAPEBLOCK_HSEC_S2B;
+       start_block = blk_rq_pos(req) >> TAPEBLOCK_HSEC_S2B;
        DBF_EVENT(6, "start_block = %i\n", start_block);
 
        rq_for_each_segment(bv, req, iter)
@@ -664,8 +664,7 @@ tape_3590_bread(struct tape_device *device, struct request *req)
                        ccw++;
                        dst += TAPEBLOCK_HSEC_SIZE;
                }
-               if (off > bv->bv_len)
-                       BUG();
+               BUG_ON(off > bv->bv_len);
        }
        ccw = tape_ccw_end(ccw, NOP, 0, NULL);
        DBF_EVENT(6, "xBREDccwg\n");
@@ -1704,24 +1703,19 @@ static struct ccw_device_id tape_3590_ids[] = {
 static int
 tape_3590_online(struct ccw_device *cdev)
 {
-       return tape_generic_online(cdev->dev.driver_data,
+       return tape_generic_online(dev_get_drvdata(&cdev->dev),
                                   &tape_discipline_3590);
 }
 
-static int
-tape_3590_offline(struct ccw_device *cdev)
-{
-       return tape_generic_offline(cdev->dev.driver_data);
-}
-
 static struct ccw_driver tape_3590_driver = {
        .name = "tape_3590",
        .owner = THIS_MODULE,
        .ids = tape_3590_ids,
        .probe = tape_generic_probe,
        .remove = tape_generic_remove,
-       .set_offline = tape_3590_offline,
+       .set_offline = tape_generic_offline,
        .set_online = tape_3590_online,
+       .freeze = tape_generic_pm_suspend,
 };
 
 /*