]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/s390/char/sclp_cpi_sys.c
Merge branch 'drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
[linux-2.6-omap-h63xx.git] / drivers / s390 / char / sclp_cpi_sys.c
index 005f330ed92689a0de2faaf7e3108879e4a213a9..62c2647f37f4b60300911326f039d78615de38ed 100644 (file)
@@ -7,6 +7,9 @@
  *              Michael Ernst <mernst@de.ibm.com>
  */
 
+#define KMSG_COMPONENT "sclp_cpi"
+#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
+
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/stat.h>
@@ -20,6 +23,7 @@
 #include <linux/completion.h>
 #include <asm/ebcdic.h>
 #include <asm/sclp.h>
+
 #include "sclp.h"
 #include "sclp_rw.h"
 #include "sclp_cpi_sys.h"
@@ -126,21 +130,15 @@ static int cpi_req(void)
        int response;
 
        rc = sclp_register(&sclp_cpi_event);
-       if (rc) {
-               printk(KERN_WARNING "cpi: could not register "
-                       "to hardware console.\n");
+       if (rc)
                goto out;
-       }
        if (!(sclp_cpi_event.sclp_receive_mask & EVTYP_CTLPROGIDENT_MASK)) {
-               printk(KERN_WARNING "cpi: no control program "
-                       "identification support\n");
                rc = -EOPNOTSUPP;
                goto out_unregister;
        }
 
        req = cpi_prepare_req();
        if (IS_ERR(req)) {
-               printk(KERN_WARNING "cpi: could not allocate request\n");
                rc = PTR_ERR(req);
                goto out_unregister;
        }
@@ -150,24 +148,22 @@ static int cpi_req(void)
 
        /* Add request to sclp queue */
        rc = sclp_add_request(req);
-       if (rc) {
-               printk(KERN_WARNING "cpi: could not start request\n");
+       if (rc)
                goto out_free_req;
-       }
 
        wait_for_completion(&completion);
 
        if (req->status != SCLP_REQ_DONE) {
-               printk(KERN_WARNING "cpi: request failed (status=0x%02x)\n",
-                       req->status);
+               pr_warning("request failed (status=0x%02x)\n",
+                          req->status);
                rc = -EIO;
                goto out_free_req;
        }
 
        response = ((struct cpi_sccb *) req->sccb)->header.response_code;
        if (response != 0x0020) {
-               printk(KERN_WARNING "cpi: failed with "
-                       "response code 0x%x\n", response);
+               pr_warning("request failed with response code 0x%x\n",
+                          response);
                rc = -EIO;
        }