Skip to contentSkip to conversation

Use controller id instead of driver name for printks

PATCH Applied Pierre Ossman 2 participants 2 messages Nov 1, 2005 – Nov 5, 2005 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Use controller id instead of driver name for printks

The printks that aren't for debugging should use the name of the controller, not the driver name. Multiple MMC controllers aren't that common today, but this is the right way to do things.

---

 drivers/mmc/wbsd.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
drivers/mmc/wbsd.c +6 -5
@@ -201,7 +201,7 @@ static void wbsd_reset(struct wbsd_host*
 {
 	u8 setup;
 
-	printk(KERN_ERR DRIVER_NAME ": Resetting chip\n");
+	printk(KERN_ERR "%s: Resetting chip\n", mmc_hostname(host->mmc));
 
 	/*
 	 * Soft reset of chip (SD/MMC part).
@@ -880,8 +880,9 @@ static void wbsd_finish_data(struct wbsd
 		 */
 		if (count)
 		{
-			printk(KERN_ERR DRIVER_NAME ": Incomplete DMA "
-				"transfer. %d bytes left.\n", count);
+			printk(KERN_ERR "%s: Incomplete DMA transfer. "
+				"%d bytes left.\n",
+				mmc_hostname(host->mmc), count);
 
 			data->error = MMC_ERR_FAILED;
 		}
@@ -1169,8 +1170,8 @@ static void wbsd_tasklet_card(unsigned l
 
 		if (host->mrq)
 		{
-			printk(KERN_ERR DRIVER_NAME
-				": Card removed during transfer!\n");
+			printk(KERN_ERR "%s: Card removed during transfer!\n",
+				mmc_hostname(host->mmc));
 			wbsd_reset(host);
 
 			host->mrq->cmd->error = MMC_ERR_FAILED;
Applied
#1 lore raw
Quoted 5 lines · Pierre Ossman

The printks that aren't for debugging should use the name of the controller, not the driver name. Multiple MMC controllers aren't that common today, but this is the right way to do things.

Applied, thanks.

Signature · 3 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core