summaryrefslogtreecommitdiff
path: root/drivers/mmc/ftsdc010_mci.c
diff options
context:
space:
mode:
authorPantelis Antoniou <panto@antoniou-consulting.com>2014-02-26 19:28:45 +0200
committerPantelis Antoniou <panto@antoniou-consulting.com>2014-03-24 11:32:10 +0200
commitab769f227f79bedae7840f99b6c0c4d66aafc78e (patch)
tree27d83f7ebf9da92a3ad1015cf736b7796e6ab76d /drivers/mmc/ftsdc010_mci.c
parent2c072c958bb544c72f0e848375803dbd6971f022 (diff)
downloadu-boot-ab769f227f79bedae7840f99b6c0c4d66aafc78e.tar.gz
u-boot-ab769f227f79bedae7840f99b6c0c4d66aafc78e.tar.bz2
u-boot-ab769f227f79bedae7840f99b6c0c4d66aafc78e.zip
mmc: Remove ops from struct mmc and put in mmc_ops
Remove the in-structure ops and put them in mmc_ops with a constant pointer to it. This makes the mmc structure smaller as well as conserving code space (in theory). All in-tree drivers are converted as well; this is done in a single patch in order to not break git bisect. Changes since V1: Fix compilation b0rked issue on omap platforms where OMAP_GPIO was not set. Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
Diffstat (limited to 'drivers/mmc/ftsdc010_mci.c')
-rw-r--r--drivers/mmc/ftsdc010_mci.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/mmc/ftsdc010_mci.c b/drivers/mmc/ftsdc010_mci.c
index 7600d5ce55..ce43ae1b84 100644
--- a/drivers/mmc/ftsdc010_mci.c
+++ b/drivers/mmc/ftsdc010_mci.c
@@ -316,6 +316,12 @@ static int ftsdc010_init(struct mmc *mmc)
return 0;
}
+static const struct mmc_ops ftsdc010_ops = {
+ .send_cmd = ftsdc010_request,
+ .set_ios = ftsdc010_set_ios,
+ .init = ftsdc010_init,
+};
+
int ftsdc010_mmc_init(int devid)
{
struct mmc *mmc;
@@ -347,10 +353,7 @@ int ftsdc010_mmc_init(int devid)
mmc->priv = chip;
sprintf(mmc->name, "ftsdc010");
- mmc->send_cmd = ftsdc010_request;
- mmc->set_ios = ftsdc010_set_ios;
- mmc->init = ftsdc010_init;
-
+ mmc->ops = &ftsdc010_ops;
mmc->host_caps = MMC_MODE_HS | MMC_MODE_HS_52MHz;
switch (readl(&regs->bwr) & FTSDC010_BWR_CAPS_MASK) {
case FTSDC010_BWR_CAPS_4BIT: