parport: Standardize use of printmode
[linux-2.6-microblaze.git] / drivers / parport / parport_gsc.c
index 922535a..9228e8f 100644 (file)
@@ -238,14 +238,14 @@ struct parport *parport_gsc_probe_port(unsigned long base,
 
        priv = kzalloc (sizeof (struct parport_gsc_private), GFP_KERNEL);
        if (!priv) {
-               printk (KERN_DEBUG "parport (0x%lx): no memory!\n", base);
+               printk(KERN_DEBUG "parport (0x%lx): no memory!\n", base);
                return NULL;
        }
        ops = kmemdup(&parport_gsc_ops, sizeof(struct parport_operations),
                      GFP_KERNEL);
        if (!ops) {
-               printk (KERN_DEBUG "parport (0x%lx): no memory for ops!\n",
-                       base);
+               printk(KERN_DEBUG "parport (0x%lx): no memory for ops!\n",
+                      base);
                kfree (priv);
                return NULL;
        }
@@ -282,7 +282,7 @@ struct parport *parport_gsc_probe_port(unsigned long base,
        p->size = (p->modes & PARPORT_MODE_EPP)?8:3;
        p->private_data = priv;
 
-       printk(KERN_INFO "%s: PC-style at 0x%lx", p->name, p->base);
+       pr_info("%s: PC-style at 0x%lx", p->name, p->base);
        p->irq = irq;
        if (p->irq == PARPORT_IRQ_AUTO) {
                p->irq = PARPORT_IRQ_NONE;
@@ -299,12 +299,16 @@ struct parport *parport_gsc_probe_port(unsigned long base,
                p->dma = PARPORT_DMA_NONE;
 
        pr_cont(" [");
-#define printmode(x) {if(p->modes&PARPORT_MODE_##x){pr_cont("%s%s",f?",":"",#x);f++;}}
+#define printmode(x)                                                   \
+do {                                                                   \
+       if (p->modes & PARPORT_MODE_##x)                                \
+               pr_cont("%s%s", f++ ? "," : "", #x);                    \
+} while (0)
        {
                int f = 0;
                printmode(PCSPP);
                printmode(TRISTATE);
-               printmode(COMPAT)
+               printmode(COMPAT);
                printmode(EPP);
 //             printmode(ECP);
 //             printmode(DMA);
@@ -315,8 +319,7 @@ struct parport *parport_gsc_probe_port(unsigned long base,
        if (p->irq != PARPORT_IRQ_NONE) {
                if (request_irq (p->irq, parport_irq_handler,
                                 0, p->name, p)) {
-                       printk (KERN_WARNING "%s: irq %d in use, "
-                               "resorting to polled operation\n",
+                       pr_warn("%s: irq %d in use, resorting to polled operation\n",
                                p->name, p->irq);
                        p->irq = PARPORT_IRQ_NONE;
                        p->dma = PARPORT_DMA_NONE;
@@ -347,7 +350,7 @@ static int __init parport_init_chip(struct parisc_device *dev)
        unsigned long port;
 
        if (!dev->irq) {
-               printk(KERN_WARNING "IRQ not found for parallel device at 0x%llx\n",
+               pr_warn("IRQ not found for parallel device at 0x%llx\n",
                        (unsigned long long)dev->hpa.start);
                return -ENODEV;
        }
@@ -360,11 +363,11 @@ static int __init parport_init_chip(struct parisc_device *dev)
        if (boot_cpu_data.cpu_type > pcxt && !pdc_add_valid(port+4)) {
 
                /* Initialize bidirectional-mode (0x10) & data-tranfer-mode #1 (0x20) */
-               printk("%s: initialize bidirectional-mode.\n", __func__);
+               pr_info("%s: initialize bidirectional-mode\n", __func__);
                parport_writeb ( (0x10 + 0x20), port + 4);
 
        } else {
-               printk("%s: enhanced parport-modes not supported.\n", __func__);
+               pr_info("%s: enhanced parport-modes not supported\n", __func__);
        }
        
        p = parport_gsc_probe_port(port, 0, dev->irq,