sdhci: remove custom controller name
[deliverable/linux.git] / drivers / mmc / host / sdhci.c
index 785bbdcf4a58212e4371fbdc024a1ef1919ffc88..71e020d6718db2329f2154a2b90bb86fbd7ef06f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  linux/drivers/mmc/host/sdhci.c - Secure Digital Host Controller Interface driver
  *
- *  Copyright (C) 2005-2007 Pierre Ossman, All Rights Reserved.
+ *  Copyright (C) 2005-2008 Pierre Ossman, All Rights Reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -1101,7 +1101,8 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id)
                goto out;
        }
 
-       DBG("*** %s got interrupt: 0x%08x\n", host->slot_descr, intmask);
+       DBG("*** %s got interrupt: 0x%08x\n",
+               mmc_hostname(host->mmc), intmask);
 
        if (intmask & (SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE)) {
                writel(intmask & (SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE),
@@ -1231,7 +1232,7 @@ static int sdhci_resume (struct pci_dev *pdev)
                if (chip->hosts[i]->flags & SDHCI_USE_DMA)
                        pci_set_master(pdev);
                ret = request_irq(chip->hosts[i]->irq, sdhci_irq,
-                       IRQF_SHARED, chip->hosts[i]->slot_descr,
+                       IRQF_SHARED, mmc_hostname(chip->hosts[i]->mmc),
                        chip->hosts[i]);
                if (ret)
                        return ret;
@@ -1320,9 +1321,7 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot)
 
        DBG("slot %d at 0x%08lx, irq %d\n", slot, host->addr, host->irq);
 
-       snprintf(host->slot_descr, 20, "sdhci:slot%d", slot);
-
-       ret = pci_request_region(pdev, host->bar, host->slot_descr);
+       ret = pci_request_region(pdev, host->bar, mmc_hostname(mmc));
        if (ret)
                goto free;
 
@@ -1339,7 +1338,7 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot)
        version = (version & SDHCI_SPEC_VER_MASK) >> SDHCI_SPEC_VER_SHIFT;
        if (version > 1) {
                printk(KERN_ERR "%s: Unknown controller version (%d). "
-                       "You may experience problems.\n", host->slot_descr,
+                       "You may experience problems.\n", mmc_hostname(mmc),
                        version);
        }
 
@@ -1362,13 +1361,13 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot)
                (host->flags & SDHCI_USE_DMA)) {
                printk(KERN_WARNING "%s: Will use DMA "
                        "mode even though HW doesn't fully "
-                       "claim to support it.\n", host->slot_descr);
+                       "claim to support it.\n", mmc_hostname(mmc));
        }
 
        if (host->flags & SDHCI_USE_DMA) {
                if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
                        printk(KERN_WARNING "%s: No suitable DMA available. "
-                               "Falling back to PIO.\n", host->slot_descr);
+                               "Falling back to PIO.\n", mmc_hostname(mmc));
                        host->flags &= ~SDHCI_USE_DMA;
                }
        }
@@ -1382,7 +1381,7 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot)
                (caps & SDHCI_CLOCK_BASE_MASK) >> SDHCI_CLOCK_BASE_SHIFT;
        if (host->max_clk == 0) {
                printk(KERN_ERR "%s: Hardware doesn't specify base clock "
-                       "frequency.\n", host->slot_descr);
+                       "frequency.\n", mmc_hostname(mmc));
                ret = -ENODEV;
                goto unmap;
        }
@@ -1392,7 +1391,7 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot)
                (caps & SDHCI_TIMEOUT_CLK_MASK) >> SDHCI_TIMEOUT_CLK_SHIFT;
        if (host->timeout_clk == 0) {
                printk(KERN_ERR "%s: Hardware doesn't specify timeout clock "
-                       "frequency.\n", host->slot_descr);
+                       "frequency.\n", mmc_hostname(mmc));
                ret = -ENODEV;
                goto unmap;
        }
@@ -1420,7 +1419,7 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot)
 
        if (mmc->ocr_avail == 0) {
                printk(KERN_ERR "%s: Hardware doesn't report any "
-                       "support voltages.\n", host->slot_descr);
+                       "support voltages.\n", mmc_hostname(mmc));
                ret = -ENODEV;
                goto unmap;
        }
@@ -1454,8 +1453,8 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot)
         */
        mmc->max_blk_size = (caps & SDHCI_MAX_BLOCK_MASK) >> SDHCI_MAX_BLOCK_SHIFT;
        if (mmc->max_blk_size >= 3) {
-               printk(KERN_WARNING "%s: Invalid maximum block size, assuming 512\n",
-                       host->slot_descr);
+               printk(KERN_WARNING "%s: Invalid maximum block size, "
+                       "assuming 512 bytes\n", mmc_hostname(mmc));
                mmc->max_blk_size = 512;
        } else
                mmc->max_blk_size = 512 << mmc->max_blk_size;
@@ -1476,7 +1475,7 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot)
        setup_timer(&host->timer, sdhci_timeout_timer, (unsigned long)host);
 
        ret = request_irq(host->irq, sdhci_irq, IRQF_SHARED,
-               host->slot_descr, host);
+               mmc_hostname(mmc), host);
        if (ret)
                goto untasklet;
 
@@ -1490,8 +1489,8 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot)
 
        mmc_add_host(mmc);
 
-       printk(KERN_INFO "%s: SDHCI at 0x%08lx irq %d %s\n", mmc_hostname(mmc),
-               host->addr, host->irq,
+       printk(KERN_INFO "%s: SDHCI at 0x%08lx irq %d %s\n",
+               mmc_hostname(mmc), host->addr, host->irq,
                (host->flags & SDHCI_USE_DMA)?"DMA":"PIO");
 
        return 0;
This page took 0.035005 seconds and 5 git commands to generate.