Skip to contentSkip to conversation

fix recent MMC driver compile breakage

PATCH In review Paul Walmsley 2 participants 2 messages May 8, 2007 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 fix recent MMC driver compile breakage

The OMAP MMC driver previously supported multiple cards per MMC host, but upper-layer support for this was recently removed (commit b855885e3b60cf6f9452848712a62517b94583eb). So, remove this support from this driver, and add a missing include.

Compile-tested only.

---
 drivers/mmc/host/omap.c |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/mmc/host/omap.c +2 -6
Index: linux-omap-2.6/drivers/mmc/host/omap.c
===================================================================
@@ -21,6 +21,7 @@
 #include <linux/delay.h>
 #include <linux/spinlock.h>
 #include <linux/timer.h>
+#include <linux/mmc/mmc.h>
 #include <linux/mmc/host.h>
 #include <linux/mmc/card.h>
 #include <linux/clk.h>
@@ -587,9 +588,8 @@ static void mmc_omap_switch_timer(unsign
 static void mmc_omap_switch_handler(struct work_struct *work)
 {
 	struct mmc_omap_host *host = container_of(work, struct mmc_omap_host, switch_work);
-	struct mmc_card *card;
 	static int complained = 0;
-	int cards = 0, cover_open;
+	int cover_open;
 
 	if (host->switch_pin == -1)
 		return;
@@ -599,10 +599,6 @@ static void mmc_omap_switch_handler(stru
 		host->switch_last_state = cover_open;
 	}
 	mmc_detect_change(host->mmc, 0);
-	list_for_each_entry(card, &host->mmc->cards, node) {
-		if (mmc_card_present(card))
-			cards++;
-	}
 	if (mmc_omap_cover_is_open(host)) {
 		if (!complained) {
 			dev_info(mmc_dev(host->mmc), "cover is open\n");
#2 lore raw
Quoted 38 lines · Paul Walmsley

The OMAP MMC driver previously supported multiple cards per MMC host, but upper-layer support for this was recently removed (commit b855885e3b60cf6f9452848712a62517b94583eb). So, remove this support from this driver, and add a missing include.

Compile-tested only.

---
 drivers/mmc/host/omap.c |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Index: linux-omap-2.6/drivers/mmc/host/omap.c
===================================================================

drivers/mmc/host/omap.c +2 -2
@@ -21,6 +21,7 @@
 #include <linux/delay.h>
 #include <linux/spinlock.h>
 #include <linux/timer.h>
+#include <linux/mmc/mmc.h>
 #include <linux/mmc/host.h>
 #include <linux/mmc/card.h>
 #include <linux/clk.h>
@@ -587,9 +588,8 @@ static void mmc_omap_switch_timer(unsign
 static void mmc_omap_switch_handler(struct work_struct *work)
 {
 	struct mmc_omap_host *host = container_of(work, struct mmc_omap_host, switch_work);
-	struct mmc_card *card;
 	static int complained = 0;
-	int cards = 0, cover_open;
+	int cover_open;
 
 	if (host->switch_pin == -1)
 		return;

drivers/mmc/host/omap.c static void mmc_omap_switch_handler(stru · line 604

Quoted 10 lines
drivers/mmc/host/omap.c +0 -4
@@ -599,10 +599,6 @@ static void mmc_omap_switch_handler(stru
 		host->switch_last_state = cover_open;
 	}
 	mmc_detect_change(host->mmc, 0);
-	list_for_each_entry(card, &host->mmc->cards, node) {
-		if (mmc_card_present(card))
-			cards++;
-	}
 	if (mmc_omap_cover_is_open(host)) {
 		if (!complained) {
 			dev_info(mmc_dev(host->mmc), "cover is open\n");

Thanks, pushing today.

Tony