瀏覽代碼

[MMC] Fix chip config in wbsd

There is a broken if clause in the wbsd driver that can cause the
driver to try and configure the chip even though none is found. This
results in i/o on invalid ports.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Pierre Ossman 19 年之前
父節點
當前提交
25cc5e5bd2
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      drivers/mmc/wbsd.c

+ 2 - 2
drivers/mmc/wbsd.c

@@ -1852,9 +1852,9 @@ static int __devinit wbsd_init(struct device* dev, int base, int irq, int dma,
 	/*
 	 * See if chip needs to be configured.
 	 */
-	if (pnp && (host->config != 0))
+	if (pnp)
 	{
-		if (!wbsd_chip_validate(host))
+		if ((host->config != 0) && !wbsd_chip_validate(host))
 		{
 			printk(KERN_WARNING DRIVER_NAME
 				": PnP active but chip not configured! "