提交 d366b643 编写于 作者: R Russell King 提交者: Russell King

[MMC] Add mmc_hostname() macro

mmc_hostname() returns a pointer to the hostname for the mmc_host.
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 099d44e8
...@@ -361,7 +361,7 @@ static void mmc_decode_cid(struct mmc_card *card) ...@@ -361,7 +361,7 @@ static void mmc_decode_cid(struct mmc_card *card)
default: default:
printk("%s: card has unknown MMCA version %d\n", printk("%s: card has unknown MMCA version %d\n",
card->host->host_name, card->csd.mmca_vsn); mmc_hostname(card->host), card->csd.mmca_vsn);
mmc_card_set_bad(card); mmc_card_set_bad(card);
break; break;
} }
...@@ -383,7 +383,7 @@ static void mmc_decode_csd(struct mmc_card *card) ...@@ -383,7 +383,7 @@ static void mmc_decode_csd(struct mmc_card *card)
csd_struct = UNSTUFF_BITS(resp, 126, 2); csd_struct = UNSTUFF_BITS(resp, 126, 2);
if (csd_struct != 1 && csd_struct != 2) { if (csd_struct != 1 && csd_struct != 2) {
printk("%s: unrecognised CSD structure version %d\n", printk("%s: unrecognised CSD structure version %d\n",
card->host->host_name, csd_struct); mmc_hostname(card->host), csd_struct);
mmc_card_set_bad(card); mmc_card_set_bad(card);
return; return;
} }
...@@ -551,7 +551,7 @@ static void mmc_discover_cards(struct mmc_host *host) ...@@ -551,7 +551,7 @@ static void mmc_discover_cards(struct mmc_host *host)
} }
if (err != MMC_ERR_NONE) { if (err != MMC_ERR_NONE) {
printk(KERN_ERR "%s: error requesting CID: %d\n", printk(KERN_ERR "%s: error requesting CID: %d\n",
host->host_name, err); mmc_hostname(host), err);
break; break;
} }
......
...@@ -206,7 +206,7 @@ void mmc_init_card(struct mmc_card *card, struct mmc_host *host) ...@@ -206,7 +206,7 @@ void mmc_init_card(struct mmc_card *card, struct mmc_host *host)
int mmc_register_card(struct mmc_card *card) int mmc_register_card(struct mmc_card *card)
{ {
snprintf(card->dev.bus_id, sizeof(card->dev.bus_id), snprintf(card->dev.bus_id, sizeof(card->dev.bus_id),
"%s:%04x", card->host->host_name, card->rca); "%s:%04x", mmc_hostname(card->host), card->rca);
return device_add(&card->dev); return device_add(&card->dev);
} }
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#ifdef CONFIG_MMC_DEBUG #ifdef CONFIG_MMC_DEBUG
#define DBG(host,fmt,args...) \ #define DBG(host,fmt,args...) \
pr_debug("%s: %s: " fmt, host->mmc->host_name, __func__ , args) pr_debug("%s: %s: " fmt, mmc_hostname(host->mmc), __func__ , args)
#else #else
#define DBG(host,fmt,args...) do { } while (0) #define DBG(host,fmt,args...) do { } while (0)
#endif #endif
...@@ -541,7 +541,7 @@ static int mmci_probe(struct amba_device *dev, void *id) ...@@ -541,7 +541,7 @@ static int mmci_probe(struct amba_device *dev, void *id)
mmc_add_host(mmc); mmc_add_host(mmc);
printk(KERN_INFO "%s: MMCI rev %x cfg %02x at 0x%08lx irq %d,%d\n", printk(KERN_INFO "%s: MMCI rev %x cfg %02x at 0x%08lx irq %d,%d\n",
mmc->host_name, amba_rev(dev), amba_config(dev), mmc_hostname(mmc), amba_rev(dev), amba_config(dev),
dev->res.start, dev->irq[0], dev->irq[1]); dev->res.start, dev->irq[0], dev->irq[1]);
init_timer(&host->timer); init_timer(&host->timer);
......
...@@ -1796,7 +1796,7 @@ static int __devinit wbsd_init(struct device* dev, int base, int irq, int dma, ...@@ -1796,7 +1796,7 @@ static int __devinit wbsd_init(struct device* dev, int base, int irq, int dma,
mmc_add_host(mmc); mmc_add_host(mmc);
printk(KERN_INFO "%s: W83L51xD", mmc->host_name); printk(KERN_INFO "%s: W83L51xD", mmc_hostname(mmc));
if (host->chip_id != 0) if (host->chip_id != 0)
printk(" id %x", (int)host->chip_id); printk(" id %x", (int)host->chip_id);
printk(" at 0x%x irq %d", (int)host->base, (int)host->irq); printk(" at 0x%x irq %d", (int)host->base, (int)host->irq);
......
...@@ -97,6 +97,7 @@ extern void mmc_free_host(struct mmc_host *); ...@@ -97,6 +97,7 @@ extern void mmc_free_host(struct mmc_host *);
#define mmc_priv(x) ((void *)((x) + 1)) #define mmc_priv(x) ((void *)((x) + 1))
#define mmc_dev(x) ((x)->dev) #define mmc_dev(x) ((x)->dev)
#define mmc_hostname(x) ((x)->host_name)
extern int mmc_suspend_host(struct mmc_host *, pm_message_t); extern int mmc_suspend_host(struct mmc_host *, pm_message_t);
extern int mmc_resume_host(struct mmc_host *); extern int mmc_resume_host(struct mmc_host *);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册