mmc: omap_hsmmc: call omap_hsmmc_set_power directly
authorAndreas Fenkart <afenkart@gmail.com>
Tue, 7 Jul 2015 18:38:43 +0000 (20:38 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 17 Aug 2015 09:32:45 +0000 (11:32 +0200)
commitf7f0f03506d00fc2939a8625ed141c2dda568fad
tree4d5a7a0f9bdaa40093567470559a881ae1cfb090
parentc21e678b256baec428662704138d85cfc593abf4
mmc: omap_hsmmc: call omap_hsmmc_set_power directly

If no pdata.set_power was set by the platform code, the driver
was updating pdata with its own fallback function. This is a no-no
since pdata shall be read-only.
This patch pushes the check 'pdata->set_power != NULL' down into
the fallback functions. If pdata.set_power is really set, it calls them
and exits, otherwise the fallback code is used.

Signed-off-by: Andreas Fenkart <afenkart@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/omap_hsmmc.c