summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/arm_pl180_mmci.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/arm_pl180_mmci.c
parent2c072c958bb544c72f0e848375803dbd6971f022 (diff)
downloadtalos-obmc-uboot-ab769f227f79bedae7840f99b6c0c4d66aafc78e.tar.gz
talos-obmc-uboot-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/arm_pl180_mmci.c')
-rw-r--r--drivers/mmc/arm_pl180_mmci.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/mmc/arm_pl180_mmci.c b/drivers/mmc/arm_pl180_mmci.c
index 5a55fe73b7..4490e9710b 100644
--- a/drivers/mmc/arm_pl180_mmci.c
+++ b/drivers/mmc/arm_pl180_mmci.c
@@ -335,6 +335,12 @@ static void host_set_ios(struct mmc *dev)
udelay(CLK_CHANGE_DELAY);
}
+static const struct mmc_ops arm_pl180_mmci_ops = {
+ .send_cmd = host_request,
+ .set_ios = host_set_ios,
+ .init = mmc_host_reset,
+};
+
/*
* mmc_host_init - initialize the mmc controller.
* Set initial clock and power for mmc slot.
@@ -360,11 +366,7 @@ int arm_pl180_mmci_init(struct pl180_mmc_host *host)
sdi_u32 = readl(&host->base->mask0) & ~SDI_MASK0_MASK;
writel(sdi_u32, &host->base->mask0);
strncpy(dev->name, host->name, sizeof(dev->name));
- dev->send_cmd = host_request;
- dev->set_ios = host_set_ios;
- dev->init = mmc_host_reset;
- dev->getcd = NULL;
- dev->getwp = NULL;
+ dev->ops = &arm_pl180_mmci_ops;
dev->host_caps = host->caps;
dev->voltages = host->voltages;
dev->f_min = host->clock_min;
OpenPOWER on IntegriCloud