Kernel messages fixup. Signed-off-by: Rodolfo Giometti <giometti@xxxxxxxx> -- GNU/Linux Solutions e-mail: giometti@xxxxxxxxxxxx Linux Device Driver giometti@xxxxxxxxx Embedded Systems giometti@xxxxxxxx UNIX programming phone: +39 349 2432127
diff --git a/drivers/mmc/au1xmmc.c b/drivers/mmc/au1xmmc.c index 6084bb8..560d6e3 100644 --- a/drivers/mmc/au1xmmc.c +++ b/drivers/mmc/au1xmmc.c @@ -54,13 +54,16 @@ #include "au1xmmc.h" #define DRIVER_NAME "au1xxx-mmc" -/* Set this to enable special debugging macros */ - -#ifdef DEBUG -#define DBG(fmt, idx, args...) printk("au1xx(%d): DEBUG: " fmt, idx, ##args) +#ifdef CONFIG_MMC_DEBUG +#define dbg(fmt, idx, args...) printk(KERN_DEBUG "%s(%d): DEBUG: " \ + fmt, DRIVER_NAME, idx, ##args) #else -#define DBG(fmt, idx, args...) +#define dbg(fmt, idx, args...) #endif +#define err(fmt, idx, args...) printk(KERN_DEBUG "%s(%d): ERROR: " \ + fmt, DRIVER_NAME, idx, ##args) +#define info(fmt, idx, args...) printk(KERN_INFO "%s(%d): " \ + fmt, DRIVER_NAME, idx, ##args) const struct { u32 iobase; @@ -445,18 +448,18 @@ static void au1xmmc_receive_pio(struct a break; if (status & SD_STATUS_RC) { - DBG("RX CRC Error [%d + %d].\n", host->id, + dbg("RX CRC Error [%d + %d].\n", host->id, host->pio.len, count); break; } if (status & SD_STATUS_RO) { - DBG("RX Overrun [%d + %d]\n", host->id, + dbg("RX Overrun [%d + %d]\n", host->id, host->pio.len, count); break; } else if (status & SD_STATUS_RU) { - DBG("RX Underrun [%d + %d]\n", host->id, + dbg("RX Underrun [%d + %d]\n", host->id, host->pio.len, count); break; } @@ -829,7 +832,7 @@ #endif au1xmmc_receive_pio(host); } else if (status & 0x203FBC70) { - DBG("Unhandled status %8.8x\n", host->id, status); + dbg("Unhandled status %8.8x\n", host->id, status); handled = 0; } @@ -856,10 +859,8 @@ static void au1xmmc_poll_event(unsigned mmc_detect_change(host->mmc, 0); } - if (host->mrq != NULL) { - u32 status = au_readl(HOST_STATUS(host)); - DBG("PENDING - %8.8x\n", host->id, status); - } + if (host->mrq != NULL) + dbg("PENDING - %8.8x\n", host->id, au_readl(HOST_STATUS(host))); mod_timer(&host->timer, jiffies + AU1XMMC_DETECT_TIMEOUT); } @@ -914,7 +915,7 @@ static int __devinit au1xmmc_probe(struc ret = request_irq(AU1100_SD_IRQ, au1xmmc_irq, IRQF_DISABLED, "MMC", 0); if (ret) { - printk(DRIVER_NAME "ERROR: Couldn't get int %d: %d\n", + err("ERROR: Couldn't get int %d: %d\n", AU1100_SD_IRQ, ret); return -ENXIO; } @@ -926,7 +927,7 @@ static int __devinit au1xmmc_probe(struc struct au1xmmc_host *host = 0; if (!mmc) { - printk(DRIVER_NAME "ERROR: no mem for host %d\n", i); + err("ERROR: no mem for host %d\n", i); au1xmmc_hosts[i] = 0; continue; } @@ -976,7 +977,7 @@ static int __devinit au1xmmc_probe(struc add_timer(&host->timer); - printk(KERN_INFO DRIVER_NAME ": MMC Controller %d set up at %8.8X (mode=%s)\n", + info("MMC Controller %d set up at %x (mode=%s)\n", host->id, host->iobase, dma ? "dma" : "pio"); }