mmc: sdhci-pci-gli: Fix build error unused-function
authorRen Zhijie <renzhijie2@huawei.com>
Sun, 19 Jun 2022 10:47:12 +0000 (18:47 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 12 Jul 2022 10:25:39 +0000 (12:25 +0200)
commit1c5fd97373115b932afa72fbc5425560e0d1148f
tree1fb257057e5e125c881ec8d51f0690a056eb027f
parent6f34a4ee738b6965a08ba11a03666e7b524aec19
mmc: sdhci-pci-gli: Fix build error unused-function

If CONFIG_PM is not set.

make ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu-, will be failed, like this:

drivers/mmc/host/sdhci-pci-gli.c:834:13: error: ‘gl9763e_set_low_power_negotiation’ defined but not used [-Werror=unused-function]
 static void gl9763e_set_low_power_negotiation(struct sdhci_pci_slot *slot, bool enable)
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [drivers/mmc/host/sdhci-pci-gli.o] Error 1

To fix building warning, wrap all related code with CONFIG_PM.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ren Zhijie <renzhijie2@huawei.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20220619104712.125364-1-renzhijie2@huawei.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-pci-gli.c