of: unittest: make gpio overlay test dependent on CONFIG_OF_GPIO
authorFrank Rowand <frank.rowand@sony.com>
Fri, 28 Feb 2020 04:16:29 +0000 (22:16 -0600)
committerRob Herring <robh@kernel.org>
Mon, 2 Mar 2020 17:32:30 +0000 (11:32 -0600)
commit485bb19d0b3eb3b679211800e3fd61e8b33ebb20
tree0ade1c53588712561b3b0ed5cb98cc2a9decbf51
parentc1507cf227824827135bc7df5522ce0b3c50be73
of: unittest: make gpio overlay test dependent on CONFIG_OF_GPIO

Randconfig testing found compile errors in drivers/of/unittest.c if
CONFIG_GPIOLIB is not set because CONFIG_OF_GPIO depends on
CONFIG_GPIOLIB.  Make the gpio overlay test depend on CONFIG_OF_GPIO.

No code is modified, it is only moved to a different location and
protected with #ifdef CONFIG_OF_GPIO.  An empty
of_unittest_overlay_gpio() is added in the #else.

Fixes: f4056e705b2e ("of: unittest: add overlay gpio test to catch gpio hog problem")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Frank Rowand <frank.rowand@sony.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Signed-off-by: Rob Herring <robh@kernel.org>
drivers/of/unittest.c