]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
pinctrl: mediatek: fix warning
authorFabien Parent <fparent@baylibre.com>
Thu, 18 Jul 2019 17:08:08 +0000 (19:08 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 29 Jul 2019 13:32:10 +0000 (09:32 -0400)
Fix the following warning when CONFIG_PINCONF=n:

drivers/pinctrl/mediatek/pinctrl-mtk-common.c:35:36:
warning: ‘mtk_drive’ defined but not used [-Wunused-const-variable=]
 static const struct mtk_drive_desc mtk_drive[] = {
                                    ^~~~~~~~~

Signed-off-by: Fabien Parent <fparent@baylibre.com>
drivers/pinctrl/mediatek/pinctrl-mtk-common.c

index 938cc75496a832b6dee6730645a2f939d419c8af..3004335c57e7228402e6b64957ad518c2c2c6e64 100644 (file)
@@ -14,6 +14,7 @@
 
 #include "pinctrl-mtk-common.h"
 
+#if CONFIG_IS_ENABLED(PINCONF)
 /**
  * struct mtk_drive_desc - the structure that holds the information
  *                         of the driving current
@@ -39,6 +40,7 @@ static const struct mtk_drive_desc mtk_drive[] = {
        [DRV_GRP3] = { 2, 8, 2, 2 },
        [DRV_GRP4] = { 2, 16, 2, 1 },
 };
+#endif
 
 static const char *mtk_pinctrl_dummy_name = "_dummy";