Skip to content

Commit

Permalink
mmc: fix broken if clause
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pierre Ossman committed Jun 7, 2007
1 parent 60da8de commit 7165129
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mmc/core/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7165129

Please sign in to comment.