diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-02-25 10:24:39 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-03-08 12:28:46 +0100 |
commit | bbee3017c755627013f61a36715c42fbfae44277 (patch) | |
tree | c48d5e57a09d2dde70c149f4d73e704b65836d21 /drivers/mci/mxs.c | |
parent | 246dbb30012842f686b1489d241e8ca297a538ef (diff) | |
download | barebox-bbee3017c755627013f61a36715c42fbfae44277.tar.gz barebox-bbee3017c755627013f61a36715c42fbfae44277.tar.xz |
mci mxs: put only once used function inline
Also, rename mci_rename after the callback it implements: stm_mci_initialize.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mci/mxs.c')
-rw-r--r-- | drivers/mci/mxs.c | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/drivers/mci/mxs.c b/drivers/mci/mxs.c index c1c5ff13c9..cc8600efbf 100644 --- a/drivers/mci/mxs.c +++ b/drivers/mci/mxs.c @@ -578,13 +578,17 @@ static void stm_mci_reset(struct device_d *hw_dev) ; } +/* ------------------------- MCI API -------------------------------------- */ + /** - * Initialize the engine - * @param hw_dev Host interface instance + * Keep the attached MMC/SD unit in a well know state + * @param mci_pdata MCI platform data * @param mci_dev MCI device instance + * @return 0 on success, negative value else */ -static int stm_mci_initialize(struct device_d *hw_dev, struct device_d *mci_dev) +static int stm_mci_initialize(struct mci_host *mci_pdata, struct device_d *mci_dev) { + struct device_d *hw_dev = mci_pdata->hw_dev; struct mci_host *host = GET_MCI_PDATA(mci_dev); struct stm_mci_host *host_data = (struct stm_mci_host*)GET_HOST_DATA(hw_dev); @@ -607,21 +611,6 @@ static int stm_mci_initialize(struct device_d *hw_dev, struct device_d *mci_dev) return 0; } -/* ------------------------- MCI API -------------------------------------- */ - -/** - * Keep the attached MMC/SD unit in a well know state - * @param mci_pdata MCI platform data - * @param mci_dev MCI device instance - * @return 0 on success, negative value else - */ -static int mci_reset(struct mci_host *mci_pdata, struct device_d *mci_dev) -{ - struct device_d *hw_dev = mci_pdata->hw_dev; - - return stm_mci_initialize(hw_dev, mci_dev); -} - /** * Process one command to the MCI card * @param mci_pdata MCI platform data @@ -716,7 +705,7 @@ static int stm_mci_probe(struct device_d *hw_dev) host->hw_dev = hw_dev; host->send_cmd = mci_request, host->set_ios = mci_set_ios, - host->init = mci_reset, + host->init = stm_mci_initialize, /* feed forward the platform specific values */ host->voltages = pd->voltages; |