Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: dw_mmc: remove unused member variable.

Since using the device-tree, didn't use the callback pointer.
So removed the unused callback pointer.
When the set_power callback is used, it should be added in future.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <chris@printf.net>

authored by

Jaehoon Chung and committed by
Chris Ball
907abd51 612de4c1

+3 -44
+3 -30
drivers/mmc/host/dw_mmc.c
··· 850 850 u32 cmdflags; 851 851 852 852 mrq = slot->mrq; 853 - if (host->pdata->select_slot) 854 - host->pdata->select_slot(slot->id); 855 853 856 854 host->cur_slot = slot; 857 855 host->mrq = mrq; ··· 983 985 switch (ios->power_mode) { 984 986 case MMC_POWER_UP: 985 987 set_bit(DW_MMC_CARD_NEED_INIT, &slot->flags); 986 - /* Power up slot */ 987 - if (slot->host->pdata->setpower) 988 - slot->host->pdata->setpower(slot->id, mmc->ocr_avail); 989 988 regs = mci_readl(slot->host, PWREN); 990 989 regs |= (1 << slot->id); 991 990 mci_writel(slot->host, PWREN, regs); 992 991 break; 993 992 case MMC_POWER_OFF: 994 - /* Power down slot */ 995 - if (slot->host->pdata->setpower) 996 - slot->host->pdata->setpower(slot->id, 0); 997 993 regs = mci_readl(slot->host, PWREN); 998 994 regs &= ~(1 << slot->id); 999 995 mci_writel(slot->host, PWREN, regs); ··· 1001 1009 { 1002 1010 int read_only; 1003 1011 struct dw_mci_slot *slot = mmc_priv(mmc); 1004 - struct dw_mci_board *brd = slot->host->pdata; 1005 1012 1006 1013 /* Use platform get_ro function, else try on board write protect */ 1007 1014 if (slot->quirks & DW_MCI_SLOT_QUIRK_NO_WRITE_PROTECT) 1008 1015 read_only = 0; 1009 - else if (brd->get_ro) 1010 - read_only = brd->get_ro(slot->id); 1011 1016 else if (gpio_is_valid(slot->wp_gpio)) 1012 1017 read_only = gpio_get_value(slot->wp_gpio); 1013 1018 else ··· 1028 1039 /* Use platform get_cd function, else try onboard card detect */ 1029 1040 if (brd->quirks & DW_MCI_QUIRK_BROKEN_CARD_DETECTION) 1030 1041 present = 1; 1031 - else if (brd->get_cd) 1032 - present = !brd->get_cd(slot->id); 1033 1042 else if (!IS_ERR_VALUE(gpio_cd)) 1034 1043 present = gpio_cd; 1035 1044 else ··· 2125 2138 mmc->f_max = freq[1]; 2126 2139 } 2127 2140 2128 - if (host->pdata->get_ocr) 2129 - mmc->ocr_avail = host->pdata->get_ocr(id); 2130 - else 2131 - mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34; 2132 - 2133 - /* 2134 - * Start with slot power disabled, it will be enabled when a card 2135 - * is detected. 2136 - */ 2137 - if (host->pdata->setpower) 2138 - host->pdata->setpower(id, 0); 2141 + mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34; 2139 2142 2140 2143 if (host->pdata->caps) 2141 2144 mmc->caps = host->pdata->caps; ··· 2194 2217 2195 2218 static void dw_mci_cleanup_slot(struct dw_mci_slot *slot, unsigned int id) 2196 2219 { 2197 - /* Shutdown detect IRQ */ 2198 - if (slot->host->pdata->exit) 2199 - slot->host->pdata->exit(id); 2200 - 2201 2220 /* Debugfs stuff is cleaned up by mmc core */ 2202 2221 mmc_remove_host(slot->mmc); 2203 2222 slot->host->slot[id] = NULL; ··· 2368 2395 } 2369 2396 } 2370 2397 2371 - if (!host->pdata->select_slot && host->pdata->num_slots > 1) { 2398 + if (host->pdata->num_slots > 1) { 2372 2399 dev_err(host->dev, 2373 - "Platform data must supply select_slot function\n"); 2400 + "Platform data must supply num_slots.\n"); 2374 2401 return -ENODEV; 2375 2402 } 2376 2403
-14
include/linux/mmc/dw_mmc.h
··· 248 248 /* delay in mS before detecting cards after interrupt */ 249 249 u32 detect_delay_ms; 250 250 251 - int (*init)(u32 slot_id, irq_handler_t , void *); 252 - int (*get_ro)(u32 slot_id); 253 - int (*get_cd)(u32 slot_id); 254 - int (*get_ocr)(u32 slot_id); 255 - int (*get_bus_wd)(u32 slot_id); 256 - /* 257 - * Enable power to selected slot and set voltage to desired level. 258 - * Voltage levels are specified using MMC_VDD_xxx defines defined 259 - * in linux/mmc/host.h file. 260 - */ 261 - void (*setpower)(u32 slot_id, u32 volt); 262 - void (*exit)(u32 slot_id); 263 - void (*select_slot)(u32 slot_id); 264 - 265 251 struct dw_mci_dma_ops *dma_ops; 266 252 struct dma_pdata *data; 267 253 struct block_settings *blk_settings;