]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/s390/char/tape_std.c
[S390] bus_id -> dev_name conversions
[linux-2.6-omap-h63xx.git] / drivers / s390 / char / tape_std.c
index 7a76ec413a3a15ac239367f821ffed0458420dd2..5bd573d144d6d880a4e130469e6e937b163e5ffa 100644 (file)
@@ -47,7 +47,7 @@ tape_std_assign_timeout(unsigned long data)
        rc = tape_cancel_io(device, request);
        if(rc)
                PRINT_ERR("(%s): Assign timeout: Cancel failed with rc = %i\n",
-                       device->cdev->dev.bus_id, rc);
+                       dev_name(&device->cdev->dev), rc);
 
 }
 
@@ -83,7 +83,7 @@ tape_std_assign(struct tape_device *device)
 
        if (rc != 0) {
                PRINT_WARN("%s: assign failed - device might be busy\n",
-                       device->cdev->dev.bus_id);
+                       dev_name(&device->cdev->dev));
                DBF_EVENT(3, "%08x: assign failed - device might be busy\n",
                        device->cdev_id);
        } else {
@@ -106,7 +106,7 @@ tape_std_unassign (struct tape_device *device)
                DBF_EVENT(3, "(%08x): Can't unassign device\n",
                        device->cdev_id);
                PRINT_WARN("(%s): Can't unassign device - device gone\n",
-                       device->cdev->dev.bus_id);
+                       dev_name(&device->cdev->dev));
                return -EIO;
        }
 
@@ -120,7 +120,8 @@ tape_std_unassign (struct tape_device *device)
 
        if ((rc = tape_do_io(device, request)) != 0) {
                DBF_EVENT(3, "%08x: Unassign failed\n", device->cdev_id);
-               PRINT_WARN("%s: Unassign failed\n", device->cdev->dev.bus_id);
+               PRINT_WARN("%s: Unassign failed\n",
+                          dev_name(&device->cdev->dev));
        } else {
                DBF_EVENT(3, "%08x: Tape unassigned\n", device->cdev_id);
        }
@@ -248,7 +249,7 @@ tape_std_mtsetblk(struct tape_device *device, int count)
 
        /* Allocate a new idal buffer. */
        new = idal_buffer_alloc(count, 0);
-       if (new == NULL)
+       if (IS_ERR(new))
                return -ENOMEM;
        if (device->char_data.idal_buf != NULL)
                idal_buffer_free(device->char_data.idal_buf);
@@ -634,10 +635,10 @@ tape_std_mtcompression(struct tape_device *device, int mt_count)
                DBF_EXCEPTION(6, "xcom parm\n");
                if (*device->modeset_byte & 0x08)
                        PRINT_INFO("(%s) Compression is currently on\n",
-                                  device->cdev->dev.bus_id);
+                                  dev_name(&device->cdev->dev));
                else
                        PRINT_INFO("(%s) Compression is currently off\n",
-                                  device->cdev->dev.bus_id);
+                                  dev_name(&device->cdev->dev));
                PRINT_INFO("Use 1 to switch compression on, 0 to "
                           "switch it off\n");
                return -EINVAL;
@@ -647,7 +648,10 @@ tape_std_mtcompression(struct tape_device *device, int mt_count)
                return PTR_ERR(request);
        request->op = TO_NOP;
        /* setup ccws */
-       *device->modeset_byte = (mt_count == 0) ? 0x00 : 0x08;
+       if (mt_count == 0)
+               *device->modeset_byte &= ~0x08;
+       else
+               *device->modeset_byte |= 0x08;
        tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte);
        tape_ccw_end(request->cpaddr + 1, NOP, 0, NULL);
        /* execute it */