pinctrl: move CONFIG_PINCTRL to drivers/Makefile
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 9 Jul 2015 01:55:01 +0000 (10:55 +0900)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 16 Jul 2015 07:40:09 +0000 (09:40 +0200)
Kbuild should descend into drivers/pinctrl/ only when CONFIG_PINCTRL
is enabled because everything under that directory depends on
CONFIG_PINCTRL.

We can avoid the conditional, ifeq ($(CONFIG_OF),y) ... endif.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/Makefile
drivers/pinctrl/Makefile

index b64b49f6e01bfd97dcff3e63dd06dd25d295d2df..e4b260ecec1553221046ba1872375d398b5135bf 100644 (file)
@@ -11,7 +11,7 @@ obj-y                         += bus/
 obj-$(CONFIG_GENERIC_PHY)      += phy/
 
 # GPIO must come after pinctrl as gpios may need to mux pins etc
-obj-y                          += pinctrl/
+obj-$(CONFIG_PINCTRL)          += pinctrl/
 obj-y                          += gpio/
 obj-y                          += pwm/
 obj-$(CONFIG_PCI)              += pci/
index f6710a8a15032cfc0f7d254c70a67214b7bedd64..76ba976cb9cad3d92fe00fafa536c69902eb8fcc 100644 (file)
@@ -2,12 +2,10 @@
 
 subdir-ccflags-$(CONFIG_DEBUG_PINCTRL) += -DDEBUG
 
-obj-$(CONFIG_PINCTRL)          += core.o pinctrl-utils.o
+obj-y                          += core.o pinctrl-utils.o
 obj-$(CONFIG_PINMUX)           += pinmux.o
 obj-$(CONFIG_PINCONF)          += pinconf.o
-ifeq ($(CONFIG_OF),y)
-obj-$(CONFIG_PINCTRL)          += devicetree.o
-endif
+obj-$(CONFIG_OF)               += devicetree.o
 obj-$(CONFIG_GENERIC_PINCONF)  += pinconf-generic.o
 obj-$(CONFIG_PINCTRL_ADI2)     += pinctrl-adi2.o
 obj-$(CONFIG_PINCTRL_AS3722)   += pinctrl-as3722.o