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.
Showing the changes to include/linux (1 of 6 files). Show all
Unified · Split
| @@ -55,7 +55,6 @@ struct can_dev_rcv_lists { · 54 unmodified lines | |||
| 55 | struct hlist_head rx[RX_MAX]; | 55 | struct hlist_head rx[RX_MAX]; |
| 56 | struct hlist_head rx_sff[CAN_SFF_RCV_ARRAY_SZ]; | 56 | struct hlist_head rx_sff[CAN_SFF_RCV_ARRAY_SZ]; |
| 57 | struct hlist_head rx_eff[CAN_EFF_RCV_ARRAY_SZ]; | 57 | struct hlist_head rx_eff[CAN_EFF_RCV_ARRAY_SZ]; |
| 58 | int remove_on_zero_entries; | ||
| 59 | int entries; | 58 | int entries; |
| 60 | }; | 59 | }; |
| 61 | 60 | ||