]> git.karo-electronics.de Git - linux-beck.git/commit
can: flexcan: flexcan_get_berr_counter(): switch on clocks before accessing ecr register
authorStefan Agner <stefan@agner.ch>
Tue, 15 Jul 2014 12:56:20 +0000 (14:56 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Sun, 17 Aug 2014 23:03:39 +0000 (01:03 +0200)
commitec56acfef2af184ca485ffeba16adbd56c110c94
tree3c7509c81a1ae6854a437a7d98f0df313e1e0565
parent4ade6feb52262eae0c40d6714e3446bfa4d19a5f
can: flexcan: flexcan_get_berr_counter(): switch on clocks before accessing ecr register

The funcion flexcan_get_berr_counter() may be called from userspace even if the
interface is down, this the clocks are disabled. This patch switches on the
clocks before accessing the ecr register.

Reported-by: Ashutosh Singh <ashuleapyear@gmail.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/flexcan.c