]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
can: flexcan: Deferred on Regulator return EPROBE_DEFER
authorAndreas Werner <kernel@andy89.org>
Sun, 22 Mar 2015 16:35:52 +0000 (17:35 +0100)
committerSasha Levin <sasha.levin@oracle.com>
Fri, 24 Apr 2015 21:13:56 +0000 (17:13 -0400)
commita32d3f403401705e40cacd8ca2a4eb7ff8d8fb69
tree219dd251623078505d5f9e680cbcc57b1ead6c35
parent44d8cbece7820e5baa1c88dec45be400bfee42c7
can: flexcan: Deferred on Regulator return EPROBE_DEFER

[ Upstream commit 555828ef45f825d6ee06559f0304163550eed380 ]

Return EPROBE_DEFER if Regulator returns EPROBE_DEFER

If the Flexcan driver is built into kernel and a regulator is used to
enable the CAN transceiver, the Flexcan driver may not use the regulator.

When initializing the Flexcan device with a regulator defined in the device
tree, but not initialized, the regulator subsystem returns EPROBE_DEFER, hence
the Flexcan init fails.

The solution for this is to return EPROBE_DEFER if regulator is not initialized
and wait until the regulator is initialized.

Signed-off-by: Andreas Werner <kernel@andy89.org>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/net/can/flexcan.c