summaryrefslogtreecommitdiffstats
path: root/drivers/clocksource/tcb_clksrc.c
diff options
context:
space:
mode:
authorGaël PORTAY <gael.portay@gmail.com>2014-09-06 19:52:35 +0200
committerNicolas Ferre <nicolas.ferre@atmel.com>2014-09-08 10:54:03 +0200
commit4930d247af29f849cd1bddd65be2400684dc886e (patch)
tree8afec844dc080e009e2e1d52e59e1e72339fe2be /drivers/clocksource/tcb_clksrc.c
parent8495497f921e73d5192d4896d55414f0304d8561 (diff)
downloadop-kernel-dev-4930d247af29f849cd1bddd65be2400684dc886e.zip
op-kernel-dev-4930d247af29f849cd1bddd65be2400684dc886e.tar.gz
ARM: at91/tclib: move initialization from alloc to probe
Move resource retrieval from atmel_tc_alloc to tc_probe to avoid lately reporting resource related issues when a TC block user request a TC block. Moreover, resources retrieval are usually done in the probe function, thus moving them add some consistency with other drivers. Initialization is done once, ie not every time a tc block is requested. If it fails, the device is not appended to the list of tc blocks. Furhermore, the device id is retrieved at probe as well, avoiding parsing DT every time the user requests of tc block. Signed-off-by: Gaël PORTAY <gael.portay@gmail.com> Acked-by: Thierry Reding <thierry.reding@gmail.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'drivers/clocksource/tcb_clksrc.c')
-rw-r--r--drivers/clocksource/tcb_clksrc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clocksource/tcb_clksrc.c b/drivers/clocksource/tcb_clksrc.c
index a8d7ea1..f922e81 100644
--- a/drivers/clocksource/tcb_clksrc.c
+++ b/drivers/clocksource/tcb_clksrc.c
@@ -279,7 +279,7 @@ static int __init tcb_clksrc_init(void)
int i;
int ret;
- tc = atmel_tc_alloc(CONFIG_ATMEL_TCB_CLKSRC_BLOCK, clksrc.name);
+ tc = atmel_tc_alloc(CONFIG_ATMEL_TCB_CLKSRC_BLOCK);
if (!tc) {
pr_debug("can't alloc TC for clocksource\n");
return -ENODEV;
OpenPOWER on IntegriCloud