[PARPORT] [PATCH]: Put KERN_* labels in all the printks

From: Juan Quintela (quintela@mandrakesoft.com)
Date: Wed May 09 2001 - 10:33:23 EDT

  • Next message: Ronnie Arosa: "Re: [PARPORT] How do I know wich device reffers to each /dev/parport entry?"

    Hi
            people here complained that Windbond was trying to log on his
            systems, I fond that the problem was that a lot of printk's
            lack a KERN_* label, I put labels around (normally the same
            that the rest of printk's in that function or with that
            functionality).

            You can see that the patch is trivial in the sense that only
            labels to printk functions are changed, not functionality has
            been changed.

    Could you apply that patch (or ask for improvements).

    Later, Juan.

    --- linux/drivers/parport/parport_amiga.c.orig Thu Apr 26 13:06:41 2001
    +++ linux/drivers/parport/parport_amiga.c Thu Apr 26 13:09:49 2001
    @@ -34,7 +34,7 @@
     
     static void amiga_write_data(struct parport *p, unsigned char data)
     {
    - DPRINTK("write_data %c\n",data);
    + DPRINTK(KERN_DEBUG "write_data %c\n",data);
             /* Triggers also /STROBE. This behavior cannot be changed */
             ciaa.prb = data;
             mb();
    @@ -73,13 +73,13 @@
     
     static void amiga_write_control(struct parport *p, unsigned char control)
     {
    - DPRINTK("write_control %02x\n",control);
    + DPRINTK(KERN_DEBUG "write_control %02x\n",control);
             /* No implementation possible */
     }
             
     static unsigned char amiga_read_control( struct parport *p)
     {
    - DPRINTK("read_control \n");
    + DPRINTK(KERN_DEBUG "read_control \n");
             return control_amiga_to_pc(0);
     }
     
    @@ -87,7 +87,7 @@
     {
             unsigned char old;
     
    - DPRINTK("frob_control mask %02x, value %02x\n",mask,val);
    + DPRINTK(KERN_DEBUG "frob_control mask %02x, value %02x\n",mask,val);
             old = amiga_read_control(p);
             amiga_write_control(p, (old & ~mask) ^ val);
             return old;
    @@ -132,7 +132,7 @@
             unsigned char status;
     
             status = status_amiga_to_pc(ciab.pra & 7);
    - DPRINTK("read_status %02x\n", status);
    + DPRINTK(KERN_DEBUG "read_status %02x\n", status);
             return status;
     }
     
    @@ -154,14 +154,14 @@
     
     static void amiga_data_forward(struct parport *p)
     {
    - DPRINTK("forward\n");
    + DPRINTK(KERN_DEBUG "forward\n");
             ciaa.ddrb = 0xff; /* all pins output */
             mb();
     }
     
     static void amiga_data_reverse(struct parport *p)
     {
    - DPRINTK("reverse\n");
    + DPRINTK(KERN_DEBUG "reverse\n");
             ciaa.ddrb = 0; /* all pins input */
             mb();
     }
    --- linux/drivers/parport/parport_cs.c.orig Thu Apr 26 13:10:31 2001
    +++ linux/drivers/parport/parport_cs.c Thu Apr 26 13:19:25 2001
    @@ -332,11 +332,11 @@
         printk(KERN_INFO "%s: PC-style PCMCIA at %#x", p->name,
                link->io.BasePort1);
         if (link->io.NumPorts2)
    - printk(" & %#x", link->io.BasePort2);
    - printk(", irq %u [SPP", link->irq.AssignedIRQ);
    + printk(KERN_INFO " & %#x", link->io.BasePort2);
    + printk(KERN_INFO ", irq %u [SPP", link->irq.AssignedIRQ);
         for (i = 0; i < 5; i++)
    - if (p->modes & mode[i].flag) printk(",%s", mode[i].name);
    - printk("]\n");
    + if (p->modes & mode[i].flag) printk(KERN_INFO ",%s", mode[i].name);
    + printk(KERN_INFO "]\n");
         
         link->state &= ~DEV_CONFIG_PENDING;
         return;
    --- linux/drivers/parport/parport_gsc.c.orig Thu Apr 26 13:20:22 2001
    +++ linux/drivers/parport/parport_gsc.c Thu Apr 26 15:28:58 2001
    @@ -405,7 +405,7 @@
                     p->irq = PARPORT_IRQ_NONE;
             }
             if (p->irq != PARPORT_IRQ_NONE) {
    - printk(", irq %d", p->irq);
    + printk(KERN_INFO ", irq %d", p->irq);
     
                     if (p->dma == PARPORT_DMA_AUTO) {
                             p->dma = PARPORT_DMA_NONE;
    @@ -415,8 +415,8 @@
                                                is mandatory (see above) */
                     p->dma = PARPORT_DMA_NONE;
     
    - printk(" [");
    -#define printmode(x) {if(p->modes&PARPORT_MODE_##x){printk("%s%s",f?",":"",#x);f++;}}
    + printk(KERN_INFO " [");
    +#define printmode(x) {if(p->modes&PARPORT_MODE_##x){printk(KERN_INFO "%s%s",f?",":"",#x);f++;}}
             {
                     int f = 0;
                     printmode(PCSPP);
    @@ -427,7 +427,7 @@
     // printmode(DMA);
             }
     #undef printmode
    - printk("]\n");
    + printk(KERN_INFO"]\n");
             parport_proc_register(p);
     
             request_region (p->base, 3, p->name);
    @@ -473,7 +473,7 @@
             irq = busdevice_alloc_irq(d);
     
             if (!irq) {
    - printk("IRQ not found for parallel device at 0x%p\n", d->hpa);
    + printk(KERN_DEBUG "IRQ not found for parallel device at 0x%p\n", d->hpa);
                 return -ENODEV;
             }
     
    @@ -484,10 +484,10 @@
             */
             if (!pdc_add_valid( (void *)(port+4))) {
                 /* Initialize bidirectional-mode (0x10) & data-tranfer-mode #1 (0x20) */
    - printk("%s: initialize bidirectional-mode.\n", __FUNCTION__);
    + printk(KERN_DEBUG "%s: initialize bidirectional-mode.\n", __FUNCTION__);
                 parport_writeb ( (0x10 + 0x20), port + 4);
             } else {
    - printk("%s: enhanced parport-modes not supported.\n", __FUNCTION__);
    + printk(KERN_DEBUG "%s: enhanced parport-modes not supported.\n", __FUNCTION__);
             }
             
             if (parport_gsc_probe_port(port, 0,
    --- linux/drivers/parport/parport_mfc3.c.orig Thu Apr 26 13:25:29 2001
    +++ linux/drivers/parport/parport_mfc3.c Thu Apr 26 13:48:15 2001
    @@ -82,7 +82,7 @@
     
     static void mfc3_write_data(struct parport *p, unsigned char data)
     {
    -DPRINTK("write_data %c\n",data);
    +DPRINTK(KERN_DEBUG "write_data %c\n",data);
     
             dummy = pia(p)->pprb; /* clears irq bit */
             /* Triggers also /STROBE.*/
    @@ -126,13 +126,13 @@
     
     static void mfc3_write_control(struct parport *p, unsigned char control)
     {
    -DPRINTK("write_control %02x\n",control);
    +DPRINTK(KERN_DEBUG "write_control %02x\n",control);
             pia(p)->ppra = (pia(p)->ppra & 0x1f) | control_pc_to_mfc3(control);
     }
             
     static unsigned char mfc3_read_control( struct parport *p)
     {
    -DPRINTK("read_control \n");
    +DPRINTK(KERN_DEBUG "read_control \n");
             return control_mfc3_to_pc(pia(p)->ppra & 0xe0);
     }
     
    @@ -140,7 +140,7 @@
     {
             unsigned char old;
     
    -DPRINTK("frob_control mask %02x, value %02x\n",mask,val);
    +DPRINTK(KERN_DEBUG "frob_control mask %02x, value %02x\n",mask,val);
             old = mfc3_read_control(p);
             mfc3_write_control(p, (old & ~mask) ^ val);
             return old;
    @@ -186,7 +186,7 @@
     #if 0 /* currently unused */
     static void mfc3_write_status( struct parport *p, unsigned char status)
     {
    -DPRINTK("write_status %02x\n",status);
    +DPRINTK(KERN_DEBUG "write_status %02x\n",status);
             pia(p)->ppra = (pia(p)->ppra & 0xe0) | status_pc_to_mfc3(status);
     }
     #endif
    @@ -196,7 +196,7 @@
             unsigned char status;
     
             status = status_mfc3_to_pc(pia(p)->ppra & 0x1f);
    -DPRINTK("read_status %02x\n", status);
    +DPRINTK(KERN_DEBUG "read_status %02x\n", status);
             return status;
     }
     
    @@ -234,7 +234,7 @@
     
     static void mfc3_data_forward(struct parport *p)
     {
    - DPRINTK("forward\n");
    + DPRINTK(KERN_DEBUG "forward\n");
             pia(p)->crb &= ~PIA_DDR; /* make data direction register visible */
             pia(p)->pddrb = 255; /* all pins output */
             pia(p)->crb |= PIA_DDR; /* make data register visible - default */
    @@ -242,7 +242,7 @@
     
     static void mfc3_data_reverse(struct parport *p)
     {
    - DPRINTK("reverse\n");
    + DPRINTK(KERN_DEBUG "reverse\n");
             pia(p)->crb &= ~PIA_DDR; /* make data direction register visible */
             pia(p)->pddrb = 0; /* all pins input */
             pia(p)->crb |= PIA_DDR; /* make data register visible - default */
    --- linux/drivers/parport/parport_pc.c.orig Thu Apr 26 13:48:51 2001
    +++ linux/drivers/parport/parport_pc.c Thu Apr 26 13:59:29 2001
    @@ -121,7 +121,7 @@
             unsigned char oecr;
             int mode;
     
    - DPRINTK("parport change_mode ECP-ISA to mode 0x%02x\n",m);
    + DPRINTK(KERN_INFO "parport change_mode ECP-ISA to mode 0x%02x\n",m);
     
             if (!priv->ecr) {
                     printk (KERN_DEBUG "change_mode: but there's no ECR!\n");
    @@ -1111,20 +1111,20 @@
             cr27=inb(io+1);
             outb(0xaa,io);
     
    - printk ("SMSC 37c669 LPT Config: cr_1=0x%02x, 4=0x%02x, "
    + printk (KERN_INFO "SMSC 37c669 LPT Config: cr_1=0x%02x, 4=0x%02x, "
                     "A=0x%2x, 23=0x%02x, 26=0x%02x, 27=0x%02x\n",
                     cr1,cr4,cra,cr23,cr26,cr27);
     
             /* The documentation calls DMA and IRQ-Lines by letters, so
                the board maker can/will wire them
                appropriately/randomly... G=reserved H=IDE-irq, */
    - printk ("SMSC LPT Config: io=0x%04x, irq=%c, dma=%c, "
    + printk (KERN_INFO "SMSC LPT Config: io=0x%04x, irq=%c, dma=%c, "
                     "fifo threshold=%d\n", cr23*4,
                     (cr27 &0x0f) ? 'A'-1+(cr27 &0x0f): '-',
                     (cr26 &0x0f) ? 'A'-1+(cr26 &0x0f): '-', cra & 0x0f);
    - printk("SMSC LPT Config: enabled=%s power=%s\n",
    + printk(KERN_INFO "SMSC LPT Config: enabled=%s power=%s\n",
                    (cr23*4 >=0x100) ?"yes":"no", (cr1 & 4) ? "yes" : "no");
    - printk("SMSC LPT Config: Port mode=%s, EPP version =%s\n",
    + printk(KERN_INFO "SMSC LPT Config: Port mode=%s, EPP version =%s\n",
                    (cr1 & 0x08 ) ? "Standard mode only (SPP)" : modes[cr4 & 0x03],
                    (cr4 & 0x40) ? "1.7" : "1.9");
     
    @@ -1136,7 +1136,7 @@
                     while((superios[i].io!= 0) && (i<NR_SUPERIOS))
                             i++;
                     if(i==NR_SUPERIOS)
    - printk("Super-IO: too many chips!\n");
    + printk(KERN_INFO "Super-IO: too many chips!\n");
                     else {
                             int d;
                             switch (cr23*4) {
    @@ -1196,23 +1196,23 @@
             crf0=inb(io+1);
             outb(0xaa,io);
     
    - printk("Winbond LPT Config: cr_30=%02x 60,61=%02x%02x "
    + printk(KERN_INFO "Winbond LPT Config: cr_30=%02x 60,61=%02x%02x "
                    "70=%02x 74=%02x, f0=%02x\n", cr30,cr60,cr61,cr70,cr74,crf0);
    - printk("Winbond LPT Config: active=%s, io=0x%02x%02x irq=%d, ",
    + printk(KERN_INFO "Winbond LPT Config: active=%s, io=0x%02x%02x irq=%d, ",
                    (cr30 & 0x01) ? "yes":"no", cr60,cr61,cr70&0x0f );
             if ((cr74 & 0x07) > 3)
    - printk("dma=none\n");
    + printk(KERN_INFO "dma=none\n");
             else
    - printk("dma=%d\n",cr74 & 0x07);
    - printk("Winbond LPT Config: irqtype=%s, ECP fifo threshold=%d\n",
    + printk(KERN_INFO "dma=%d\n",cr74 & 0x07);
    + printk(KERN_INFO "Winbond LPT Config: irqtype=%s, ECP fifo threshold=%d\n",
                    irqtypes[crf0>>7], (crf0>>3)&0x0f);
    - printk("Winbond LPT Config: Port mode=%s\n", modes[crf0 & 0x07]);
    + printk(KERN_INFO "Winbond LPT Config: Port mode=%s\n", modes[crf0 & 0x07]);
     
             if(cr30 & 0x01) { /* the settings can be interrogated later ... */
                     while((superios[i].io!= 0) && (i<NR_SUPERIOS))
                             i++;
                     if(i==NR_SUPERIOS)
    - printk("Super-IO: too many chips!\n");
    + printk(KERN_INFO "Super-IO: too many chips!\n");
                     else {
                             superios[i].io = (cr60<<8)|cr61;
                             superios[i].irq = cr70&0x0f;
    @@ -1232,7 +1232,7 @@
                        non-winbond register */
                     return;
     
    - printk("Winbond chip at EFER=0x%x key=0x%02x devid=%02x devrev=%02x "
    + printk(KERN_INFO "Winbond chip at EFER=0x%x key=0x%02x devid=%02x devrev=%02x "
                    "oldid=%02x\n", efer,key,devid,devrev,oldid);
             id=(devid<<8) | devrev;
     
    @@ -1252,9 +1252,9 @@
             else progif=0;
     
             if(type==NULL)
    - printk("Winbond unknown chip type\n");
    + printk(KERN_INFO "Winbond unknown chip type\n");
             else
    - printk("Winbond chip type %s\n",type);
    + printk(KERN_INFO "Winbond chip type %s\n",type);
     
             if(progif==2)
                     show_parconfig_winbond(efer,key);
    @@ -1273,7 +1273,7 @@
                     return;
     
             func=NULL;
    - printk("SMSC chip at EFER=0x%x key=0x%02x devid=%02x devrev=%02x\n",
    + printk(KERN_INFO "SMSC chip at EFER=0x%x key=0x%02x devid=%02x devrev=%02x\n",
                    efer,key,devid,devrev);
             id=(devid<<8) | devrev;
     
    @@ -1283,9 +1283,9 @@
             else if (devid==0x66) type="37c666GT";
     
             if(type==NULL)
    - printk("SMSC unknown chip type\n");
    + printk(KERN_INFO "SMSC unknown chip type\n");
             else
    - printk("SMSC chip type %s\n",type);
    + printk(KERN_INFO "SMSC chip type %s\n",type);
     
             if(func) (func)(efer,key);
             return;
    @@ -1386,7 +1386,7 @@
     
     static void __devinit detect_and_report_winbond (void)
     {
    - printk("Winbond Super-IO detection, now testing ports 3F0,370,250,4E,2E ...\n");
    + printk(KERN_INFO "Winbond Super-IO detection, now testing ports 3F0,370,250,4E,2E ...\n");
     
             winbond_check(0x3f0,0x87);
             winbond_check(0x370,0x87);
    @@ -1399,7 +1399,7 @@
     
     static void __devinit detect_and_report_smsc (void)
     {
    - printk("SMSC Super-IO detection, now testing Ports 2F0, 370 ...\n");
    + printk(KERN_INFO "SMSC Super-IO detection, now testing Ports 2F0, 370 ...\n");
             smsc_check(0x3f0,0x55);
             smsc_check(0x370,0x55);
             smsc_check(0x3f0,0x44);
    @@ -1413,7 +1413,7 @@
             while((superios[i].io!= 0) && (i<NR_SUPERIOS))
                     i++;
             if(i==NR_SUPERIOS) {
    - printk("Super-IO: too many chips!\n");
    + printk(KERN_INFO "Super-IO: too many chips!\n");
                     return;
             }
             superios[i].io = io;
    @@ -1722,14 +1722,14 @@
                     pb->base, config, configb);
             printk (KERN_DEBUG "0x%lx: ECP settings irq=", pb->base);
             if ((configb >>3) & 0x07)
    - printk("%d",intrline[(configb >>3) & 0x07]);
    + printk(KERN_DEBUG "%d",intrline[(configb >>3) & 0x07]);
             else
    - printk("<none or set by other means>");
    - printk ( " dma=");
    + printk(KERN_DEBUG "<none or set by other means>");
    + printk (KERN_DEBUG " dma=");
             if( (configb & 0x03 ) == 0x00)
    - printk("<none or set by other means>\n");
    + printk(KERN_DEBUG "<none or set by other means>\n");
             else
    - printk("%d\n",configb & 0x07);
    + printk(KERN_DEBUG "%d\n",configb & 0x07);
     
             /* Go back to mode 000 */
             frob_econtrol (pb, 0xe0, ECR_SPP << 5);
    @@ -2082,7 +2082,7 @@
     
             printk(KERN_INFO "%s: PC-style at 0x%lx", p->name, p->base);
             if (p->base_hi && (p->modes & PARPORT_MODE_ECP))
    - printk(" (0x%lx)", p->base_hi);
    + printk(KERN_INFO " (0x%lx)", p->base_hi);
             p->irq = irq;
             p->dma = dma;
             if (p->irq == PARPORT_IRQ_AUTO) {
    @@ -2095,7 +2095,7 @@
                     p->irq = PARPORT_IRQ_NONE;
             }
             if (p->irq != PARPORT_IRQ_NONE) {
    - printk(", irq %d", p->irq);
    + printk(KERN_INFO ", irq %d", p->irq);
     
                     if (p->dma == PARPORT_DMA_AUTO) {
                             p->dma = PARPORT_DMA_NONE;
    @@ -2114,18 +2114,18 @@
                     p->ops->ecp_write_data = parport_pc_ecp_write_block_pio;
     #endif /* IEEE 1284 support */
                     if (p->dma != PARPORT_DMA_NONE) {
    - printk(", dma %d", p->dma);
    + printk(KERN_INFO ", dma %d", p->dma);
                             p->modes |= PARPORT_MODE_DMA;
                     }
    - else printk(", using FIFO");
    + else printk(KERN_INFO ", using FIFO");
             }
             else
                     /* We can't use the DMA channel after all. */
                     p->dma = PARPORT_DMA_NONE;
     #endif /* Allowed to use FIFO/DMA */
     
    - printk(" [");
    -#define printmode(x) {if(p->modes&PARPORT_MODE_##x){printk("%s%s",f?",":"",#x);f++;}}
    + printk(KERN_INFO " [");
    +#define printmode(x) {if(p->modes&PARPORT_MODE_##x){printk(KERN_INFO "%s%s",f?",":"",#x);f++;}}
             {
                     int f = 0;
                     printmode(PCSPP);
    @@ -2137,9 +2137,9 @@
             }
     #undef printmode
     #ifndef CONFIG_PARPORT_1284
    - printk ("(,...)");
    + printk (KERN_INFO "(,...)");
     #endif /* CONFIG_PARPORT_1284 */
    - printk("]\n");
    + printk(KERN_INFO "]\n");
             if (probedirq != PARPORT_IRQ_NONE)
                     printk(KERN_INFO "%s: irq %d detected\n", p->name, probedirq);
             parport_proc_register(p);
    @@ -2300,10 +2300,10 @@
                     printk (KERN_INFO
                             "parport_pc: Via 686A parallel port: io=0x%X", port1);
                     if (irq != PARPORT_IRQ_NONE)
    - printk (", irq=%d", irq);
    + printk (KERN_INFO ", irq=%d", irq);
                     if (dma != PARPORT_DMA_NONE)
    - printk (", dma=%d", dma);
    - printk ("\n");
    + printk (KERN_INFO ", dma=%d", dma);
    + printk (KERN_INFO "\n");
                     return 1;
             }
             
    --- linux/drivers/parport/parport_sunbpp.c.orig Thu Apr 26 14:00:00 2001
    +++ linux/drivers/parport/parport_sunbpp.c Thu Apr 26 14:06:45 2001
    @@ -74,7 +74,7 @@
             struct bpp_regs *regs = (struct bpp_regs *)p->base;
     
             sbus_writeb(d, &regs->p_dr);
    - dprintk(("wrote 0x%x\n", d));
    + dprintk((KERN_DEBUG "wrote 0x%x\n", d));
     }
     
     static unsigned char parport_sunbpp_read_data(struct parport *p)
    @@ -123,8 +123,8 @@
             if (!(value_tcr & P_TCR_BUSY))
                     bits |= PARPORT_STATUS_BUSY;
     
    - dprintk(("tcr 0x%x ir 0x%x\n", regs->p_tcr, regs->p_ir));
    - dprintk(("read status 0x%x\n", bits));
    + dprintk((KERN_DEBUG "tcr 0x%x ir 0x%x\n", regs->p_tcr, regs->p_ir));
    + dprintk((KERN_DEBUG "read status 0x%x\n", bits));
             return bits;
     }
     
    @@ -144,8 +144,8 @@
             if (value_or & P_OR_SLCT_IN)
                     bits |= PARPORT_CONTROL_SELECT;
     
    - dprintk(("tcr 0x%x or 0x%x\n", regs->p_tcr, regs->p_or));
    - dprintk(("read control 0x%x\n", bits));
    + dprintk((KERN_DEBUG "tcr 0x%x or 0x%x\n", regs->p_tcr, regs->p_or));
    + dprintk((KERN_DEBUG "read control 0x%x\n", bits));
             return bits;
     }
     
    @@ -162,7 +162,7 @@
             unsigned char value_tcr = sbus_readb(&regs->p_tcr);
             unsigned char value_or = sbus_readb(&regs->p_or);
     
    - dprintk(("frob1: tcr 0x%x or 0x%x\n", regs->p_tcr, regs->p_or));
    + dprintk((KERN_DEBUG "frob1: tcr 0x%x or 0x%x\n", regs->p_tcr, regs->p_or));
             if (mask & PARPORT_CONTROL_STROBE) {
                     if (val & PARPORT_CONTROL_STROBE) {
                             value_tcr &= ~P_TCR_DS;
    @@ -194,7 +194,7 @@
     
             sbus_writeb(value_or, &regs->p_or);
             sbus_writeb(value_tcr, &regs->p_tcr);
    - dprintk(("frob2: tcr 0x%x or 0x%x\n", regs->p_tcr, regs->p_or));
    + dprintk((KERN_DEBUG "frob2: tcr 0x%x or 0x%x\n", regs->p_tcr, regs->p_or));
             return parport_sunbpp_read_control(p);
     }
     
    @@ -218,7 +218,7 @@
             struct bpp_regs *regs = (struct bpp_regs *)p->base;
             unsigned char value_tcr = sbus_readb(&regs->p_tcr);
     
    - dprintk(("forward\n"));
    + dprintk((KERN_DEBUG "forward\n"));
             value_tcr &= ~P_TCR_DIR;
             sbus_writeb(value_tcr, &regs->p_tcr);
     }
    @@ -228,7 +228,7 @@
             struct bpp_regs *regs = (struct bpp_regs *)p->base;
             u8 val = sbus_readb(&regs->p_tcr);
     
    - dprintk(("reverse\n"));
    + dprintk((KERN_DEBUG "reverse\n"));
             val |= P_TCR_DIR;
             sbus_writeb(val, &regs->p_tcr);
     }
    @@ -311,7 +311,7 @@
             struct bpp_regs *regs;
             unsigned char value_tcr;
     
    - dprintk(("init_one_port(%p): ranges, alloc_io, ", sdev));
    + dprintk((KERN_DEBUG "init_one_port(%p): ranges, alloc_io, ", sdev));
             irq = sdev->irqs[0];
             base = sbus_ioremap(&sdev->resource[0], 0,
                                 sdev->reg_addrs[0].reg_size,
    @@ -319,7 +319,7 @@
             size = sdev->reg_addrs[0].reg_size;
             dma = PARPORT_DMA_NONE;
     
    - dprintk(("alloc(ppops), "));
    + dprintk((KERN_DEBUG "alloc(ppops), "));
             ops = kmalloc (sizeof (struct parport_operations), GFP_KERNEL);
             if (!ops) {
                     sbus_iounmap(base, size);
    @@ -328,7 +328,7 @@
     
             memcpy (ops, &parport_sunbpp_ops, sizeof (struct parport_operations));
     
    - dprintk(("register_port, "));
    + dprintk((KERN_DEBUG "register_port, "));
             if (!(p = parport_register_port(base, irq, dma, ops))) {
                     kfree(ops);
                     sbus_iounmap(base, size);
    @@ -337,22 +337,22 @@
     
             p->size = size;
     
    - dprintk(("init_one_port: request_irq(%08x:%p:%x:%s:%p) ",
    + dprintk((KERN_DEBUG "init_one_port: request_irq(%08x:%p:%x:%s:%p) ",
                     p->irq, parport_sunbpp_interrupt, SA_SHIRQ, p->name, p));
             if ((err = request_irq(p->irq, parport_sunbpp_interrupt,
                                    SA_SHIRQ, p->name, p)) != 0) {
    - dprintk(("ERROR %d\n", err));
    + dprintk((KERN_DEBUG "ERROR %d\n", err));
                     parport_unregister_port(p);
                     kfree(ops);
                     sbus_iounmap(base, size);
                     return err;
             } else {
    - dprintk(("OK\n"));
    + dprintk((KERN_DEBUG "OK\n"));
                     parport_sunbpp_enable_irq(p);
             }
     
             regs = (struct bpp_regs *)p->base;
    - dprintk(("forward\n"));
    + dprintk((KERN_DEBUG "forward\n"));
             value_tcr = sbus_readb(&regs->p_tcr);
             value_tcr &= ~P_TCR_DIR;
             sbus_writeb(value_tcr, &regs->p_tcr);
    --- linux/drivers/parport/probe.c.orig Thu Apr 26 14:07:13 2001
    +++ linux/drivers/parport/probe.c Thu Apr 26 14:10:54 2001
    @@ -37,13 +37,13 @@
             printk(KERN_INFO "%s", port->name);
     
             if (device >= 0)
    - printk (" (addr %d)", device);
    + printk (KERN_INFO " (addr %d)", device);
     
    - printk (": %s", classes[info->class].descr);
    + printk (KERN_INFO ": %s", classes[info->class].descr);
             if (info->class)
    - printk(", %s %s", info->mfr, info->model);
    + printk(KERN_INFO ", %s %s", info->mfr, info->model);
     
    - printk("\n");
    + printk(KERN_INFO "\n");
     }
     
     static char *strdup(char *str)
    @@ -62,7 +62,7 @@
             struct parport_device_info *info = &port->probe_info[device + 1];
     
             if (!txt) {
    - printk("%s probe: memory squeeze\n", port->name);
    + printk(KERN_INFO "%s probe: memory squeeze\n", port->name);
                     return;
             }
             strcpy(txt, str);
    --- linux/drivers/parport/share.c.orig Thu Apr 26 14:11:47 2001
    +++ linux/drivers/parport/share.c Thu Apr 26 14:12:07 2001
    @@ -1103,7 +1103,7 @@
                             if (ep != str[i])
                                     val[i] = r;
                             else {
    - printk("parport: bad specifier `%s'\n", str[i]);
    + printk(KERN_ERR "parport: bad specifier `%s'\n", str[i]);
                                     return -1;
                             }
                     }

    -- 
    In theory, practice and theory are the same, but in practice they 
    are different -- Larry McVoy
    

    -- To unsubscribe, send mail to: linux-parport-request@torque.net -- -- with the single word "unsubscribe" in the body of the message. --



    This archive was generated by hypermail 2b29 : Wed May 09 2001 - 14:49:00 EDT