[S390] tape: Use pr_xxx instead of dev_xxx in shared driver code
authorMichael Holzheu <holzheu@linux.vnet.ibm.com>
Fri, 11 Sep 2009 08:29:07 +0000 (10:29 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 11 Sep 2009 08:29:57 +0000 (10:29 +0200)
For messages from the tape core that is shared between the 3590 and 34xx
tape disciplines, we want to have the "tape" prefix instead of "tape_3590"
or "tape_34xx". In order to fix this, we now use the pr_xxx printk macros.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/char/tape_34xx.c
drivers/s390/char/tape_3590.c
drivers/s390/char/tape_block.c
drivers/s390/char/tape_core.c

index 5a519fa..2fe45ff 100644 (file)
@@ -8,7 +8,7 @@
  *              Martin Schwidefsky <schwidefsky@de.ibm.com>
  */
 
-#define KMSG_COMPONENT "tape"
+#define KMSG_COMPONENT "tape_34xx"
 
 #include <linux/module.h>
 #include <linux/init.h>
index 418f72d..e4cc3aa 100644 (file)
@@ -8,7 +8,7 @@
  *              Martin Schwidefsky <schwidefsky@de.ibm.com>
  */
 
-#define KMSG_COMPONENT "tape"
+#define KMSG_COMPONENT "tape_3590"
 
 #include <linux/module.h>
 #include <linux/init.h>
@@ -39,8 +39,6 @@ EXPORT_SYMBOL(TAPE_DBF_AREA);
  * - Read Alternate:            implemented
  *******************************************************************/
 
-#define KMSG_COMPONENT "tape"
-
 static const char *tape_3590_msg[TAPE_3590_MAX_MSG] = {
        [0x00] = "",
        [0x10] = "Lost Sense",
index 1c2a582..4cb9e70 100644 (file)
@@ -310,8 +310,8 @@ tapeblock_revalidate_disk(struct gendisk *disk)
        if (rc < 0)
                return rc;
 
-       dev_info(&device->cdev->dev, "Determining the size of the recorded "
-               "area...\n");
+       pr_info("%s: Determining the size of the recorded area...\n",
+               dev_name(&device->cdev->dev));
        DBF_LH(3, "Image file ends at %d\n", rc);
        nr_of_blks = rc;
 
@@ -330,8 +330,8 @@ tapeblock_revalidate_disk(struct gendisk *disk)
        device->bof = rc;
        nr_of_blks -= rc;
 
-       dev_info(&device->cdev->dev, "The size of the recorded area is %i "
-               "blocks\n", nr_of_blks);
+       pr_info("%s: The size of the recorded area is %i blocks\n",
+               dev_name(&device->cdev->dev), nr_of_blks);
        set_capacity(device->blk_data.disk,
                nr_of_blks*(TAPEBLOCK_HSEC_SIZE/512));
 
@@ -366,8 +366,8 @@ tapeblock_open(struct block_device *bdev, fmode_t mode)
 
        if (device->required_tapemarks) {
                DBF_EVENT(2, "TBLOCK: missing tapemarks\n");
-               dev_warn(&device->cdev->dev, "Opening the tape failed because"
-                       " of missing end-of-file marks\n");
+               pr_warning("%s: Opening the tape failed because of missing "
+                          "end-of-file marks\n", dev_name(&device->cdev->dev));
                rc = -EPERM;
                goto put_device;
        }
index 934a42e..5cd31e0 100644 (file)
@@ -215,14 +215,14 @@ tape_med_state_set(struct tape_device *device, enum tape_medium_state newstate)
        case MS_UNLOADED:
                device->tape_generic_status |= GMT_DR_OPEN(~0);
                if (device->medium_state == MS_LOADED)
-                       dev_info(&device->cdev->dev, "The tape cartridge has "
-                                "been successfully unloaded\n");
+                       pr_info("%s: The tape cartridge has been successfully "
+                               "unloaded\n", dev_name(&device->cdev->dev));
                break;
        case MS_LOADED:
                device->tape_generic_status &= ~GMT_DR_OPEN(~0);
                if (device->medium_state == MS_UNLOADED)
-                       dev_info(&device->cdev->dev, "A tape cartridge has "
-                                "been mounted\n");
+                       pr_info("%s: A tape cartridge has been mounted\n",
+                               dev_name(&device->cdev->dev));
                break;
        default:
                // print nothing
@@ -656,8 +656,8 @@ tape_generic_remove(struct ccw_device *cdev)
                         */
                        DBF_EVENT(3, "(%08x): Drive in use vanished!\n",
                                device->cdev_id);
-                       dev_warn(&device->cdev->dev, "A tape unit was detached"
-                               " while in use\n");
+                       pr_warning("%s: A tape unit was detached while in "
+                                  "use\n", dev_name(&device->cdev->dev));
                        tape_state_set(device, TS_NOT_OPER);
                        __tape_discard_requests(device);
                        spin_unlock_irq(get_ccwdev_lock(device->cdev));