]> git.baikalelectronics.ru Git - kernel.git/commit
can: make use of preallocated can_ml_priv for per device struct can_dev_rcv_lists
authorMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 8 Oct 2018 07:02:39 +0000 (09:02 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 4 Sep 2019 11:29:15 +0000 (13:29 +0200)
commitc578cffcb161f2c7142c441e60133b44b7e7027e
treec783503e0599f77685c82925a36bfa3f0a2a9794
parent4df62ce38c7ebe606c3a0bd5337c611adcf85bae
can: make use of preallocated can_ml_priv for per device struct can_dev_rcv_lists

This patch removes the old method of allocating the per device protocol
specific memory via a netdevice_notifier. This had the drawback, that
the allocation can fail, leading to a lot of null pointer checks in the
code. This also makes the live cycle management of this memory quite
complicated.

This patch switches from the allocating the struct can_dev_rcv_lists in
a NETDEV_REGISTER call to using the dev->ml_priv, which is allocated by
the driver since the previous patch.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/dev.c
drivers/net/can/slcan.c
drivers/net/can/vcan.c
drivers/net/can/vxcan.c
include/linux/can/can-ml.h
net/can/af_can.c