gpio: omap: allow building the module with COMPILE_TEST=y
Subsystems (2)
PATCH v2 1/2 gpio: omap: allow building the module with COMPILE_TEST=y
From: Bartosz Golaszewski <[email protected]>
For better build coverage, allow building the gpio-omap driver with COMPILE_TEST Kconfig option enabled.
While at it: simplify the dependencies and drop the dependency on ARM as it's already implied by ARCH_OMAP.
---
Changes in v2:
- rework Kconfig dependencies
drivers/gpio/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpio/Kconfig +2 -2
@@ -528,9 +528,9 @@ config GPIO_OCTEON family of SOCs. config GPIO_OMAP - tristate "TI OMAP GPIO support" if ARCH_OMAP2PLUS || COMPILE_TEST + tristate "TI OMAP GPIO support" + depends on ARCH_OMAP || COMPILE_TEST default y if ARCH_OMAP - depends on ARM select GENERIC_IRQ_CHIP select GPIOLIB_IRQCHIP help
Signature · 1 line
2.45.2
PATCH v2 2/2 gpio: omap: save two lines by using devm_clk_get_prepared()
From: Bartosz Golaszewski <[email protected]>
We can drop the else branch if we get the clock already prepared using the relevant helper.
--- drivers/gpio/gpio-omap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpio/gpio-omap.c +1 -3
@@ -1449,13 +1449,11 @@ static int omap_gpio_probe(struct platform_device *pdev) }if (bank->dbck_flag) { - bank->dbck =devm_clk_get (dev,"dbclk" ); + bank->dbck =devm_clk_get_prepared (dev,"dbclk" );if (IS_ERR (bank->dbck)) {dev_err (dev,"Could not get gpio dbck. Disable debounce\n" ); bank->dbck_flag = false; - }else { -clk_prepare (bank->dbck); } }
Signature · 1 line
2.45.2
Bartosz Golaszewski
AppliedFrom: Bartosz Golaszewski <[email protected]>
Quoted 8 lines · Bartosz Golaszewski
For better build coverage, allow building the gpio-omap driver with
COMPILE_TESTKconfigoption enabled.While at it: simplify the dependencies and drop the dependency on ARM as it's already implied by
ARCH_OMAP.[...]
Applied, thanks!
[1/2] gpio: omap: allow building the module with COMPILE_TEST=y
commit: 934bacb6441afdb77093a46b3138f81cbcde7d81
[2/2] gpio: omap: save two lines by using devm_clk_get_prepared()
commit: b7bbaff8c1bccf48958e52f6f03593fc47906b5dBest regards,
Signature · 1 line
Bartosz Golaszewski <[email protected]>