]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitee929a27130bbb42b00a880e3644aac006fa423d
tree0ade1c53588712561b3b0ed5cb98cc2a9decbf51
parent7b876558163c52fb83427456d0f29d7efe5eb325
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: d84d37399cfd ("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