[U-Boot,v4,1/2] pinctrl: mediatek: fix warning
diff mbox series

Message ID 20190718170809.17105-1-fparent@baylibre.com
State Accepted
Commit e66b202eb3aba9f3cf93c2a20d8f28360dfb095f
Delegated to: Tom Rini
Headers show
Series
  • [U-Boot,v4,1/2] pinctrl: mediatek: fix warning
Related show

Commit Message

Fabien Parent July 18, 2019, 5:08 p.m. UTC
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>
---

v4:
	* New patch

---
 drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Tom Rini July 30, 2019, 1:24 a.m. UTC | #1
On Thu, Jul 18, 2019 at 07:08:08PM +0200, Fabien Parent wrote:

> 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>

Applied to u-boot/master, thanks!

Patch
diff mbox series

diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
index 938cc75496..3004335c57 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
@@ -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";