The design of the sja1105 tagger dp->priv is that each port has a separate struct sja1105_port, and the sp->data pointer points to a common struct sja1105_tagger_data. We have removed all per-port members accessible by the tagger, and now only struct sja1105_tagger_data remains. Make dp->priv point directly to this.
Showing the changes to include/linux (1 of 5 files). Show all
Unified · Split
| @@ -43,9 +43,7 @@ struct sja1105_deferred_xmit_work { · 42 unmodified lines | ||
| 43 | 43 | struct kthread_work work; |
| 44 | 44 | }; |
| 45 | 45 | |
| 46 | −/* Global tagger data: each struct sja1105_port has a reference to | |
| 47 | − * the structure defined in struct sja1105_private. | |
| 48 | − */ | |
| 46 | +/* Global tagger data */ | |
| 49 | 47 | struct sja1105_tagger_data { |
| 50 | 48 | struct sk_buff *stampable_skb; |
| 51 | 49 | /* Protects concurrent access to the meta state machine |
| @@ -72,10 +70,6 @@ struct sja1105_skb_cb { · 20 unmodified lines | ||
| 72 | 70 | #define SJA1105_SKB_CB(skb) \ |
| 73 | 71 | ((struct sja1105_skb_cb *)((skb)->cb)) |
| 74 | 72 | |
| 75 | −struct sja1105_port { | |
| 76 | − struct sja1105_tagger_data *data; | |
| 77 | −}; | |
| 78 | − | |
| 79 | 73 | /* Timestamps are in units of 8 ns clock ticks (equivalent to |
| 80 | 74 | * a fixed 125 MHz clock). |
| 81 | 75 | */ |