summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Lütke-Stetzkamp <christian@lkamp.de>2018-04-18 17:27:21 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-23 15:37:48 +0200
commit4c02a65fb22ebca38ebfdb2c6e7379cda36d8835 (patch)
tree82b6892fa2f9209e40be3b5a1ee8db2c6cb107f9
parentd1a0db1eb3aa9f420d46135004560faa0108baa5 (diff)
staging: mt7621-mmc: Remove unused field get_cd_status from msdc_hw
The get_cd_status() field of msdc_hw is never set and there is only one check for it being non zero, so it is deleted. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/mt7621-mmc/board.h1
-rw-r--r--drivers/staging/mt7621-mmc/sd.c15
2 files changed, 5 insertions, 11 deletions
diff --git a/drivers/staging/mt7621-mmc/board.h b/drivers/staging/mt7621-mmc/board.h
index b4678df2bdb1..833d8770fc46 100644
--- a/drivers/staging/mt7621-mmc/board.h
+++ b/drivers/staging/mt7621-mmc/board.h
@@ -76,7 +76,6 @@ struct msdc_hw {
/* external cd irq operations */
void (*enable_cd_eirq)(void);
void (*disable_cd_eirq)(void);
- int (*get_cd_status)(void);
};
extern struct msdc_hw msdc0_hw;
diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index 7f0fcf3d7786..61f2e79460f5 100644
--- a/drivers/staging/mt7621-mmc/sd.c
+++ b/drivers/staging/mt7621-mmc/sd.c
@@ -513,7 +513,6 @@ static void msdc_tasklet_card(struct work_struct *work)
struct msdc_host *host = (struct msdc_host *)container_of(work,
struct msdc_host, card_delaywork.work);
#endif
- struct msdc_hw *hw = host->hw;
u32 base = host->base;
u32 inserted;
u32 status = 0;
@@ -521,15 +520,11 @@ static void msdc_tasklet_card(struct work_struct *work)
spin_lock(&host->lock);
- if (hw->get_cd_status) { // NULL
- inserted = hw->get_cd_status();
- } else {
- status = sdr_read32(MSDC_PS);
- if (cd_active_low)
- inserted = (status & MSDC_PS_CDSTS) ? 0 : 1;
- else
- inserted = (status & MSDC_PS_CDSTS) ? 1 : 0;
- }
+ status = sdr_read32(MSDC_PS);
+ if (cd_active_low)
+ inserted = (status & MSDC_PS_CDSTS) ? 0 : 1;
+ else
+ inserted = (status & MSDC_PS_CDSTS) ? 1 : 0;
#if 0
change = host->card_inserted ^ inserted;