diff mbox series

[v3,9/9] misc: atmel_tclib: do not probe already used TCBs

Message ID 20190426214718.13470-10-alexandre.belloni@bootlin.com (mailing list archive)
State Mainlined, archived
Commit 8c9374068ef6dc3fdf244484b4711a6e10c84d1a
Headers show
Series clocksource: improve Atmel TCB timer driver | expand

Commit Message

Alexandre Belloni April 26, 2019, 9:47 p.m. UTC
The TCBs that have children are using the proper DT bindings and don't need
to be handled by tclib.

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/misc/atmel_tclib.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/drivers/misc/atmel_tclib.c b/drivers/misc/atmel_tclib.c
index 194f774ab3a1..2c6850ef0e9c 100644
--- a/drivers/misc/atmel_tclib.c
+++ b/drivers/misc/atmel_tclib.c
@@ -111,6 +111,9 @@  static int __init tc_probe(struct platform_device *pdev)
 	struct resource	*r;
 	unsigned int	i;
 
+	if (of_get_child_count(pdev->dev.of_node))
+		return -EBUSY;
+
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0)
 		return -EINVAL;