diff mbox series

[11/12] misc: atmel_tclib: do not probe already used TCBs

Message ID 20190403141120.32754-12-alexandre.belloni@bootlin.com (mailing list archive)
State New, archived
Headers show
Series clocksource: improve Atmel TCB timer driver | expand

Commit Message

Alexandre Belloni April 3, 2019, 2:11 p.m. UTC
The TCBs that have children are using the new (proper) DT bindings and
don't need to be handled by tclib.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/misc/atmel_tclib.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Greg KH April 25, 2019, 8:18 p.m. UTC | #1
On Wed, Apr 03, 2019 at 04:11:19PM +0200, Alexandre Belloni wrote:
> The TCBs that have children are using the new (proper) DT bindings and
> don't need to be handled by tclib.
> 
> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> ---
>  drivers/misc/atmel_tclib.c | 3 +++
>  1 file changed, 3 insertions(+)
> 

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff mbox series

Patch

diff --git a/drivers/misc/atmel_tclib.c b/drivers/misc/atmel_tclib.c
index c79190525862..b610cc894cd8 100644
--- a/drivers/misc/atmel_tclib.c
+++ b/drivers/misc/atmel_tclib.c
@@ -79,6 +79,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 0;
+
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0)
 		return -EINVAL;