]> git.baikalelectronics.ru Git - kernel.git/commit
can: flexcan: move rx_offload_add() from flexcan_probe() to flexcan_open()
authorPankaj Bansal <pankaj.bansal@nxp.com>
Mon, 13 Aug 2018 18:20:49 +0000 (23:50 +0530)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 28 Nov 2018 15:51:44 +0000 (16:51 +0100)
commitaf8dea81f01314ee519efa05cd33b4c8a35dd79b
tree692330cbfe9171fb5ca973e3d97d82ada932caaf
parent0918f907ace0661a69c5c2cef744f3882bbcad35
can: flexcan: move rx_offload_add() from flexcan_probe() to flexcan_open()

rx offload depends on number of message buffers, which in turn depends
on messgae buffer size. with the upcoming LX2160A SOC the message buffer
size can be configured to 72 bytes if it were to be used in CAN FD mode.

The current mode in which the flexcan is being operated is known at the
time of flexcan_open() but not at the time of flexcan_probe().

Therefore, move the rx_offload_add() from flexcan_probe() to
flexcan_open(). correspondingly, move rx_offload_delete() from
flexcan_remove() to flexcan_close().

Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/flexcan.c