Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+18 -11
+7 -2
drivers/mmc/card/block.c
··· 615 615 616 616 static int __init mmc_blk_init(void) 617 617 { 618 - int res = -ENOMEM; 618 + int res; 619 619 620 620 res = register_blkdev(MMC_BLOCK_MAJOR, "mmc"); 621 621 if (res) 622 622 goto out; 623 623 624 - return mmc_register_driver(&mmc_driver); 624 + res = mmc_register_driver(&mmc_driver); 625 + if (res) 626 + goto out2; 625 627 628 + return 0; 629 + out2: 630 + unregister_blkdev(MMC_BLOCK_MAJOR, "mmc"); 626 631 out: 627 632 return res; 628 633 }
+1 -3
drivers/mmc/card/mmc_test.c
··· 1040 1040 1041 1041 }; 1042 1042 1043 - static struct mutex mmc_test_lock; 1043 + static DEFINE_MUTEX(mmc_test_lock); 1044 1044 1045 1045 static void mmc_test_run(struct mmc_test_card *test, int testcase) 1046 1046 { ··· 1170 1170 1171 1171 if ((card->type != MMC_TYPE_MMC) && (card->type != MMC_TYPE_SD)) 1172 1172 return -ENODEV; 1173 - 1174 - mutex_init(&mmc_test_lock); 1175 1173 1176 1174 ret = device_create_file(&card->dev, &dev_attr_test); 1177 1175 if (ret)
+8 -4
drivers/mmc/host/atmel-mci.c
··· 195 195 196 196 /* Grab a more or less consistent snapshot */ 197 197 spin_lock_irq(&host->mmc->lock); 198 + clk_enable(host->mck); 198 199 memcpy_fromio(buf, host->regs, MCI_REGS_SIZE); 200 + clk_disable(host->mck); 199 201 spin_unlock_irq(&host->mmc->lock); 200 202 201 203 seq_printf(s, "MR:\t0x%08x%s%s CLKDIV=%u\n", ··· 217 215 218 216 atmci_show_status_reg(s, "SR", buf[MCI_SR / 4]); 219 217 atmci_show_status_reg(s, "IMR", buf[MCI_IMR / 4]); 218 + 219 + kfree(buf); 220 220 221 221 return 0; 222 222 } ··· 241 237 struct mmc_host *mmc; 242 238 struct dentry *root; 243 239 struct dentry *node; 244 - struct resource *res; 245 240 246 241 mmc = host->mmc; 247 242 root = mmc->debugfs_root; ··· 253 250 return; 254 251 if (!node) 255 252 goto err; 256 - 257 - res = platform_get_resource(host->pdev, IORESOURCE_MEM, 0); 258 - node->d_inode->i_size = res->end - res->start + 1; 259 253 260 254 node = debugfs_create_file("req", S_IRUSR, root, host, &atmci_req_fops); 261 255 if (!node) ··· 1059 1059 host->present = !gpio_get_value(host->detect_pin); 1060 1060 } 1061 1061 } 1062 + 1063 + if (!gpio_is_valid(host->detect_pin)) 1064 + mmc->caps |= MMC_CAP_NEEDS_POLL; 1065 + 1062 1066 if (gpio_is_valid(host->wp_pin)) { 1063 1067 if (gpio_request(host->wp_pin, "mmc_wp")) { 1064 1068 dev_dbg(&mmc->class_dev, "no WP pin available\n");
+2 -2
drivers/mmc/host/tmio_mmc.h
··· 159 159 #define STATUS_TO_TEXT(a) \ 160 160 do { \ 161 161 if (status & TMIO_STAT_##a) \ 162 - printf(#a); \ 162 + printk(#a); \ 163 163 } while (0) 164 164 165 - void debug_status(u32 status) 165 + void pr_debug_status(u32 status) 166 166 { 167 167 printk(KERN_DEBUG "status: %08x = ", status); 168 168 STATUS_TO_TEXT(CARD_REMOVE);