struct mutex reg_mutex;
/* all fields below are cleared on reset */
- bool vlan;
- u16 vlan_id[PSB6970_MAX_VLANS];
- u8 vlan_table[PSB6970_MAX_VLANS];
- u8 vlan_tagged;
- u16 pvid[PSB6970_NUM_PORTS];
+ struct_group(psb6970_priv_volatile,
+ bool vlan;
+ u16 vlan_id[PSB6970_MAX_VLANS];
+ u8 vlan_table[PSB6970_MAX_VLANS];
+ u8 vlan_tagged;
+ u16 pvid[PSB6970_NUM_PORTS];
+ );
};
#define to_psb6970(_dev) container_of(_dev, struct psb6970_priv, dev)
mutex_lock(&priv->reg_mutex);
- memset(&priv->vlan, 0, sizeof(struct psb6970_priv) -
- offsetof(struct psb6970_priv, vlan));
+ memset(&priv->psb6970_priv_volatile, 0,
+ sizeof(priv->psb6970_priv_volatile));
for (i = 0; i < PSB6970_MAX_VLANS; i++)
priv->vlan_id[i] = i;