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

Message ID 20190403141120.32754-12-alexandre.belloni@bootlin.com
State New
Headers show
Series
  • clocksource: improve Atmel TCB timer driver
Related show

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>

Patch
diff mbox series

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;