diff options
author | Pantelis Antoniou <panto@antoniou-consulting.com> | 2014-02-26 19:28:45 +0200 |
---|---|---|
committer | Pantelis Antoniou <panto@antoniou-consulting.com> | 2014-03-24 11:32:10 +0200 |
commit | ab769f227f79bedae7840f99b6c0c4d66aafc78e (patch) | |
tree | 27d83f7ebf9da92a3ad1015cf736b7796e6ab76d /drivers/mmc/gen_atmel_mci.c | |
parent | 2c072c958bb544c72f0e848375803dbd6971f022 (diff) | |
download | u-boot-ab769f227f79bedae7840f99b6c0c4d66aafc78e.tar.gz u-boot-ab769f227f79bedae7840f99b6c0c4d66aafc78e.tar.xz 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/gen_atmel_mci.c')
-rw-r--r-- | drivers/mmc/gen_atmel_mci.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/mmc/gen_atmel_mci.c b/drivers/mmc/gen_atmel_mci.c index c11dcd0f97..456f8bfdd4 100644 --- a/drivers/mmc/gen_atmel_mci.c +++ b/drivers/mmc/gen_atmel_mci.c @@ -344,6 +344,12 @@ static int mci_init(struct mmc *mmc) return 0; } +static const struct mmc_ops atmel_mci_ops = { + .send_cmd = mci_send_cmd, + .set_ios = mci_set_ios, + .init = mci_init, +}; + /* * This is the only exported function * @@ -360,11 +366,7 @@ int atmel_mci_init(void *regs) strcpy(mmc->name, "mci"); mmc->priv = regs; - mmc->send_cmd = mci_send_cmd; - mmc->set_ios = mci_set_ios; - mmc->init = mci_init; - mmc->getcd = NULL; - mmc->getwp = NULL; + mmc->ops = &atmel_mci_ops; /* need to be able to pass these in on a board by board basis */ mmc->voltages = MMC_VDD_32_33 | MMC_VDD_33_34; |