diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-01-19 09:54:44 -0500 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2018-01-22 02:20:36 -0500 |
commit | 4a09d0b86bad0999a2bb0e2ee126a3c5246d1f51 (patch) | |
tree | a41cf50b38eeb0e219407be2bc59c4236118dd86 | |
parent | 2a9d6c8060894ce06855b09d62be64110e48f27e (diff) |
mmc: tmio: hide unused tmio_mmc_clk_disable/tmio_mmc_clk_enable functions
When CONFIG_PM is disabled, we get a warning about the clock handling
being unused:
drivers/mmc/host/tmio_mmc_core.c:937:13: error: 'tmio_mmc_clk_disable' defined but not used [-Werror=unused-function]
static void tmio_mmc_clk_disable(struct tmio_mmc_host *host)
^~~~~~~~~~~~~~~~~~~~
drivers/mmc/host/tmio_mmc_core.c:929:12: error: 'tmio_mmc_clk_enable' defined but not used [-Werror=unused-function]
static int tmio_mmc_clk_enable(struct tmio_mmc_host *host)
^~~~~~~~~~~~~~~~~~~
As the clock handling is now done elsewhere, this is only used when
power management is enabled. We could make the functions as __maybe_unused,
but since there is already an #ifdef section, it seems easier to move
the helpers closer to their callers.
Fixes: b21fc294387e ("mmc: tmio: move clk_enable/disable out of tmio_mmc_host_probe()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r-- | drivers/mmc/host/tmio_mmc_core.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c index 6d8719be75a8..33494241245a 100644 --- a/drivers/mmc/host/tmio_mmc_core.c +++ b/drivers/mmc/host/tmio_mmc_core.c | |||
@@ -926,20 +926,6 @@ static void tmio_mmc_done_work(struct work_struct *work) | |||
926 | tmio_mmc_finish_request(host); | 926 | tmio_mmc_finish_request(host); |
927 | } | 927 | } |
928 | 928 | ||
929 | static int tmio_mmc_clk_enable(struct tmio_mmc_host *host) | ||
930 | { | ||
931 | if (!host->clk_enable) | ||
932 | return -ENOTSUPP; | ||
933 | |||
934 | return host->clk_enable(host); | ||
935 | } | ||
936 | |||
937 | static void tmio_mmc_clk_disable(struct tmio_mmc_host *host) | ||
938 | { | ||
939 | if (host->clk_disable) | ||
940 | host->clk_disable(host); | ||
941 | } | ||
942 | |||
943 | static void tmio_mmc_power_on(struct tmio_mmc_host *host, unsigned short vdd) | 929 | static void tmio_mmc_power_on(struct tmio_mmc_host *host, unsigned short vdd) |
944 | { | 930 | { |
945 | struct mmc_host *mmc = host->mmc; | 931 | struct mmc_host *mmc = host->mmc; |
@@ -1337,6 +1323,20 @@ void tmio_mmc_host_remove(struct tmio_mmc_host *host) | |||
1337 | EXPORT_SYMBOL_GPL(tmio_mmc_host_remove); | 1323 | EXPORT_SYMBOL_GPL(tmio_mmc_host_remove); |
1338 | 1324 | ||
1339 | #ifdef CONFIG_PM | 1325 | #ifdef CONFIG_PM |
1326 | static int tmio_mmc_clk_enable(struct tmio_mmc_host *host) | ||
1327 | { | ||
1328 | if (!host->clk_enable) | ||
1329 | return -ENOTSUPP; | ||
1330 | |||
1331 | return host->clk_enable(host); | ||
1332 | } | ||
1333 | |||
1334 | static void tmio_mmc_clk_disable(struct tmio_mmc_host *host) | ||
1335 | { | ||
1336 | if (host->clk_disable) | ||
1337 | host->clk_disable(host); | ||
1338 | } | ||
1339 | |||
1340 | int tmio_mmc_host_runtime_suspend(struct device *dev) | 1340 | int tmio_mmc_host_runtime_suspend(struct device *dev) |
1341 | { | 1341 | { |
1342 | struct tmio_mmc_host *host = dev_get_drvdata(dev); | 1342 | struct tmio_mmc_host *host = dev_get_drvdata(dev); |