Lines Matching refs:pd
71 struct procdata *pd = card->proclog;
75 if (!pd)
78 cp = pd->logtmp;
88 printk(KERN_INFO "%s", pd->logtmp);
90 put_log_buffer(card, pd->logtmp);
104 struct procdata *pd = card->proclog;
108 if (!pd)
114 if (pd->if_used <= 0)
121 ib->proc_ctrl = pd; /* point to own control structure */
123 ib->usage_cnt = pd->if_used;
124 if (!pd->log_head)
125 pd->log_head = ib; /* new head */
127 pd->log_tail->next = ib; /* follows existing messages */
128 pd->log_tail = ib; /* new tail */
129 i = pd->del_lock++; /* get lock state */
134 while (pd->log_head->next) {
135 if ((pd->log_head->usage_cnt <= 0) &&
136 (pd->log_head->next->usage_cnt <= 0)) {
137 ib = pd->log_head;
138 pd->log_head = pd->log_head->next;
142 } /* pd->log_head->next */
143 pd->del_lock--; /* release lock level */
144 wake_up_interruptible(&(pd->rd_queue)); /* announce new entry */
188 struct procdata *pd = NULL;
198 pd = card->proclog;
199 if (pd->log == pde)
204 interruptible_sleep_on(&(pd->rd_queue));
230 struct procdata *pd = NULL;
236 pd = card->proclog;
237 if (pd->log == PDE(ino))
253 pd->if_used++;
254 if (pd->log_head)
255 filep->private_data = &pd->log_tail->next;
257 filep->private_data = &pd->log_head;
278 struct procdata *pd;
289 pd = NULL;
292 pd = (struct procdata *) inf->proc_ctrl; /* still entries there */
297 pd = card->proclog;
298 if (pd->log == PDE(ino))
303 pd = card->proclog; /* pointer to procfs log */
305 if (pd)
306 pd->if_used--; /* decrement interface usage count by one */
313 if (pd)
314 if (pd->if_used <= 0) /* delete buffers if last file closed */
315 while (pd->log_head) {
316 inf = pd->log_head;
317 pd->log_head = pd->log_head->next;
335 struct procdata *pd = NULL;
343 pd = card->proclog;
344 if (pd->log == pde)
351 poll_wait(file, &(pd->rd_queue), wait);
381 struct procdata *pd;
385 if ((pd = kzalloc(sizeof(struct procdata), GFP_KERNEL)) != NULL) {
386 sprintf(pd->log_name, "%s%d", PROC_LOG_BASENAME, card->myid);
387 pd->log = proc_create(pd->log_name,
391 init_waitqueue_head(&(pd->rd_queue));
393 card->proclog = (void *) pd; /* remember procfs structure */
406 struct procdata *pd;
408 if ((pd = (struct procdata *) card->proclog) != NULL) {
409 if (pd->log)
410 remove_proc_entry(pd->log_name, hysdn_proc_entry);
411 kfree(pd); /* release memory */