mmc: fix broken if clause
authorPierre Ossman <drzeus@drzeus.cx>
Wed, 6 Jun 2007 18:23:25 +0000 (20:23 +0200)
committerPierre Ossman <drzeus@drzeus.cx>
Thu, 7 Jun 2007 07:25:54 +0000 (09:25 +0200)
Fix a broken if clause which was causing SD cards to go into
4-bit mode even if the host did not support it.

(Reported by David Brownell and Marc Pignat)

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
drivers/mmc/core/sd.c

index c1dfd03..5afac20 100644 (file)
@@ -402,7 +402,7 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
        /*
         * Switch to wider bus (if supported).
         */
-       if ((host->caps && MMC_CAP_4_BIT_DATA) &&
+       if ((host->caps & MMC_CAP_4_BIT_DATA) &&
                (card->scr.bus_widths & SD_SCR_BUS_WIDTH_4)) {
                err = mmc_app_set_bus_width(card, MMC_BUS_WIDTH_4);
                if (err != MMC_ERR_NONE)