Lines Matching refs:PRIV
35 #define PRIV(dev) ((struct uPD98402_priv *) dev->phy_data) macro
46 atomic_add(GET(HECCT),&PRIV(dev)->sonet_stats.uncorr_hcs); in fetch_stats()
47 sonet_copy_stats(&PRIV(dev)->sonet_stats,&tmp); in fetch_stats()
53 sonet_subtract_stats(&PRIV(dev)->sonet_stats,&tmp); in fetch_stats()
76 spin_lock_irqsave(&PRIV(dev)->lock, flags); in set_framing()
82 spin_unlock_irqrestore(&PRIV(dev)->lock, flags); in set_framing()
92 spin_lock_irqsave(&PRIV(dev)->lock, flags); in get_sense()
96 spin_unlock_irqrestore(&PRIV(dev)->lock, flags); in get_sense()
131 PRIV(dev)->loop_mode = mode; in set_loopback()
146 return put_user(PRIV(dev)->framing,(int __user *)arg) ? in uPD98402_ioctl()
153 return put_user(PRIV(dev)->loop_mode,(int __user *)arg) ? in uPD98402_ioctl()
165 { atomic_add(GET(v),&PRIV(dev)->sonet_stats.s); \
166 if (atomic_read(&PRIV(dev)->sonet_stats.s) < 0) \
167 atomic_set(&PRIV(dev)->sonet_stats.s,INT_MAX); }
199 &PRIV(dev)->sonet_stats.uncorr_hcs); in uPD98402_int()
216 spin_lock_init(&PRIV(dev)->lock); in uPD98402_start()
217 memset(&PRIV(dev)->sonet_stats,0,sizeof(struct k_sonet_stats)); in uPD98402_start()
226 atomic_set(&PRIV(dev)->sonet_stats.corr_hcs,-1); in uPD98402_start()
227 atomic_set(&PRIV(dev)->sonet_stats.tx_cells,-1); in uPD98402_start()
228 atomic_set(&PRIV(dev)->sonet_stats.rx_cells,-1); in uPD98402_start()
236 kfree(PRIV(dev)); in uPD98402_stop()