Lines Matching refs:counts
47 struct phy_counts *counts; in phy_get_counts() local
53 list_for_each_entry(counts, uc_priv, list) in phy_get_counts()
54 if (counts->id == phy->id) in phy_get_counts()
55 return counts; in phy_get_counts()
63 struct phy_counts *counts; in phy_alloc_counts() local
71 counts = kzalloc(sizeof(*counts), GFP_KERNEL); in phy_alloc_counts()
72 if (!counts) in phy_alloc_counts()
75 counts->id = phy->id; in phy_alloc_counts()
76 counts->power_on_count = 0; in phy_alloc_counts()
77 counts->init_count = 0; in phy_alloc_counts()
78 list_add(&counts->list, uc_priv); in phy_alloc_counts()
95 struct phy_counts *counts, *next; in phy_uclass_pre_remove() local
97 list_for_each_entry_safe(counts, next, uc_priv, list) in phy_uclass_pre_remove()
98 kfree(counts); in phy_uclass_pre_remove()
191 struct phy_counts *counts; in generic_phy_init() local
201 counts = phy_get_counts(phy); in generic_phy_init()
202 if (counts->init_count > 0) { in generic_phy_init()
203 counts->init_count++; in generic_phy_init()
212 counts->init_count = 1; in generic_phy_init()
230 struct phy_counts *counts; in generic_phy_exit() local
240 counts = phy_get_counts(phy); in generic_phy_exit()
241 if (counts->init_count == 0) in generic_phy_exit()
243 if (counts->init_count > 1) { in generic_phy_exit()
244 counts->init_count--; in generic_phy_exit()
253 counts->init_count = 0; in generic_phy_exit()
260 struct phy_counts *counts; in generic_phy_power_on() local
270 counts = phy_get_counts(phy); in generic_phy_power_on()
271 if (counts->power_on_count > 0) { in generic_phy_power_on()
272 counts->power_on_count++; in generic_phy_power_on()
281 counts->power_on_count = 1; in generic_phy_power_on()
288 struct phy_counts *counts; in generic_phy_power_off() local
298 counts = phy_get_counts(phy); in generic_phy_power_off()
299 if (counts->power_on_count == 0) in generic_phy_power_off()
301 if (counts->power_on_count > 1) { in generic_phy_power_off()
302 counts->power_on_count--; in generic_phy_power_off()
311 counts->power_on_count = 0; in generic_phy_power_off()