Skip to contentSkip to conversation

gpio: clps711x: Use of_match_ptr()

PATCH In review Alexander Shiyan 2 participants 4 messages Dec 24, 2013 – Jan 7, 2014 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 gpio: clps711x: Use of_match_ptr()

There is no reason to keep the OF data if the driver was compiled without DT support.

---
 drivers/gpio/gpio-clps711x.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpio/gpio-clps711x.c +2 -2
index 0924f20..d355027 100644
@@ -77,7 +77,7 @@ static int clps711x_gpio_remove(struct platform_device *pdev)
 	return bgpio_remove(bgc);
 }
 
-static const struct of_device_id clps711x_gpio_ids[] = {
+static const struct of_device_id __maybe_unused clps711x_gpio_ids[] = {
 	{ .compatible = "cirrus,clps711x-gpio" },
 	{ }
 };
@@ -87,7 +87,7 @@ static struct platform_driver clps711x_gpio_driver = {
 	.driver	= {
 		.name		= "clps711x-gpio",
 		.owner		= THIS_MODULE,
-		.of_match_table	= clps711x_gpio_ids,
+		.of_match_table	= of_match_ptr(clps711x_gpio_ids),
 	},
 	.probe	= clps711x_gpio_probe,
 	.remove	= clps711x_gpio_remove,
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH 2/2 gpio: clps711x: Enable driver compilation with COMPILE_TEST

This helps increasing build testing coverage.

---
 drivers/gpio/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/Kconfig +1 -1
index 98bc397..5416f5b 100644
@@ -110,7 +110,7 @@ comment "Memory mapped GPIO drivers:"
 
 config GPIO_CLPS711X
 	tristate "CLPS711X GPIO support"
-	depends on ARCH_CLPS711X
+	depends on ARCH_CLPS711X || COMPILE_TEST
 	select GPIO_GENERIC
 	help
 	  Say yes here to support GPIO on CLPS711X SoCs.
Signature · 1 line
1.8.3.2