History

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.

Marc Kleine-Budde committed 8 years ago

Commit 8df9ffb1 parent ffd956e6 files · +12 −39Browse files

Showing the changes to include/linux/can (1 of 6 files). Show all

Unified · Split

include/linux/can/can-ml.h+0−1
@@ -55,7 +55,6 @@ struct can_dev_rcv_lists { · 54 unmodified lines
5555 struct hlist_head rx[RX_MAX];
5656 struct hlist_head rx_sff[CAN_SFF_RCV_ARRAY_SZ];
5757 struct hlist_head rx_eff[CAN_EFF_RCV_ARRAY_SZ];
58− int remove_on_zero_entries;
5958 int entries;
6059 };
6160

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t