diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-09-21 12:38:45 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-09-21 12:38:45 -0700 |
commit | 5c0a95c73f80c034914e219eee8075acdf56b527 (patch) | |
tree | b6c4eba6b5a1070a673159f14472de741535eb79 /drivers/mmc/host/atmel-mci.c | |
parent | baaea1dc0befb7b64e6dbf2d1469d0a296a79e54 (diff) | |
parent | a650031a6bd16cb6789da9b3c27fc97341239f12 (diff) | |
download | blackbird-op-linux-5c0a95c73f80c034914e219eee8075acdf56b527.tar.gz blackbird-op-linux-5c0a95c73f80c034914e219eee8075acdf56b527.zip |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
mmc_test: initialize mmc_test_lock statically
mmc_block: handle error from mmc_register_driver()
atmel-mci: Set MMC_CAP_NEEDS_POLL if no detect_pin
atmel-mci: Fix bogus debugfs file size
atmel-mci: Fix memory leak in atmci_regs_show
atmel-mci: debugfs: enable clock before dumping regs
tmio_mmc: fix compilation with debug enabled
Diffstat (limited to 'drivers/mmc/host/atmel-mci.c')
-rw-r--r-- | drivers/mmc/host/atmel-mci.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index 0bd06f5bd62f..917035e16da4 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -195,7 +195,9 @@ static int atmci_regs_show(struct seq_file *s, void *v) /* Grab a more or less consistent snapshot */ spin_lock_irq(&host->mmc->lock); + clk_enable(host->mck); memcpy_fromio(buf, host->regs, MCI_REGS_SIZE); + clk_disable(host->mck); spin_unlock_irq(&host->mmc->lock); seq_printf(s, "MR:\t0x%08x%s%s CLKDIV=%u\n", @@ -216,6 +218,8 @@ static int atmci_regs_show(struct seq_file *s, void *v) atmci_show_status_reg(s, "SR", buf[MCI_SR / 4]); atmci_show_status_reg(s, "IMR", buf[MCI_IMR / 4]); + kfree(buf); + return 0; } @@ -237,7 +241,6 @@ static void atmci_init_debugfs(struct atmel_mci *host) struct mmc_host *mmc; struct dentry *root; struct dentry *node; - struct resource *res; mmc = host->mmc; root = mmc->debugfs_root; @@ -251,9 +254,6 @@ static void atmci_init_debugfs(struct atmel_mci *host) if (!node) goto err; - res = platform_get_resource(host->pdev, IORESOURCE_MEM, 0); - node->d_inode->i_size = res->end - res->start + 1; - node = debugfs_create_file("req", S_IRUSR, root, host, &atmci_req_fops); if (!node) goto err; @@ -1059,6 +1059,10 @@ static int __init atmci_probe(struct platform_device *pdev) host->present = !gpio_get_value(host->detect_pin); } } + + if (!gpio_is_valid(host->detect_pin)) + mmc->caps |= MMC_CAP_NEEDS_POLL; + if (gpio_is_valid(host->wp_pin)) { if (gpio_request(host->wp_pin, "mmc_wp")) { dev_dbg(&mmc->class_dev, "no WP pin available\n"); |