summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0009-misc-atmel_tclib-do-not-probe-already-used-TCBs.patch
blob: 310baa7dee6cc25a3595b4d666c995258b481007 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
Date: Fri, 26 Apr 2019 23:47:18 +0200
Subject: [PATCH 09/10] misc: atmel_tclib: do not probe already used TCBs
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.0/older/patches-5.0.10-rt7.tar.xz

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>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 drivers/misc/atmel_tclib.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/misc/atmel_tclib.c
+++ b/drivers/misc/atmel_tclib.c
@@ -111,6 +111,9 @@ static int __init tc_probe(struct platfo
 	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;