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/dw_mmc.c | |
| parent | 2c072c958bb544c72f0e848375803dbd6971f022 (diff) | |
| download | olio-uboot-2014.01-ab769f227f79bedae7840f99b6c0c4d66aafc78e.tar.xz olio-uboot-2014.01-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/dw_mmc.c')
| -rw-r--r-- | drivers/mmc/dw_mmc.c | 10 | 
1 files changed, 7 insertions, 3 deletions
| diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index d45c15cfa..2e6576e8d 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -343,6 +343,12 @@ static int dwmci_init(struct mmc *mmc)  	return 0;  } +static const struct mmc_ops dwmci_ops = { +	.send_cmd	= dwmci_send_cmd, +	.set_ios	= dwmci_set_ios, +	.init		= dwmci_init, +}; +  int add_dwmci(struct dwmci_host *host, u32 max_clk, u32 min_clk)  {  	struct mmc *mmc; @@ -358,9 +364,7 @@ int add_dwmci(struct dwmci_host *host, u32 max_clk, u32 min_clk)  	host->mmc = mmc;  	sprintf(mmc->name, "%s", host->name); -	mmc->send_cmd = dwmci_send_cmd; -	mmc->set_ios = dwmci_set_ios; -	mmc->init = dwmci_init; +	mmc->ops = &dwmci_ops;  	mmc->f_min = min_clk;  	mmc->f_max = max_clk; |