can: flexcan: move enabling/disabling of interrupts from flexcan_chip_{start,stop...
authorMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 19 Nov 2020 10:09:14 +0000 (11:09 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 20 Nov 2020 11:06:46 +0000 (12:06 +0100)
commit49dea0443918da38f1cce94e74e17d2972c03016
treec344e8e903cadbbd677cedf168adc7f3017880d9
parent1c5e6dbe4c4f83bb44735656f52a501ebbe3281a
can: flexcan: move enabling/disabling of interrupts from flexcan_chip_{start,stop}() to callers

The function flexcan_chip_start() first configures the CAN controller and then
enables the interrupt, flexcan_chip_stop() does the opposite.

In an upcoming patch the order of operations in flexcan_open() and
flexcan_close() are changed. This requires
flexcan_chip_start()/flexcan_chip_stop_disable_on_error() and
flexcan_chip_interrupts_{enable,disable}() to be independent of each other.

This patch moves the enabling of the interrupts from flexcan_chip_start() to
its callers flexcan_open() and flexcan_resume(). Likewise the disabling of the
interrupts is moved from __flexcan_chip_stop() to its indirect callers
flexcan_close() and flexcan_suspend().

Link: https://lore.kernel.org/r/20201119100917.3013281-3-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/flexcan.c