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 */
185 struct procdata *pd = NULL;
195 pd = card->proclog;
196 if (pd->log == pde)
201 interruptible_sleep_on(&(pd->rd_queue));
227 struct procdata *pd = NULL;
233 pd = card->proclog;
234 if (pd->log == PDE(ino))
250 pd->if_used++;
251 if (pd->log_head)
252 filep->private_data = &pd->log_tail->next;
254 filep->private_data = &pd->log_head;
275 struct procdata *pd;
286 pd = NULL;
289 pd = (struct procdata *) inf->proc_ctrl; /* still entries there */
294 pd = card->proclog;
295 if (pd->log == PDE(ino))
300 pd = card->proclog; /* pointer to procfs log */
302 if (pd)
303 pd->if_used--; /* decrement interface usage count by one */
310 if (pd)
311 if (pd->if_used <= 0) /* delete buffers if last file closed */
312 while (pd->log_head) {
313 inf = pd->log_head;
314 pd->log_head = pd->log_head->next;
332 struct procdata *pd = NULL;
340 pd = card->proclog;
341 if (pd->log == pde)
348 poll_wait(file, &(pd->rd_queue), wait);
378 struct procdata *pd;
382 if ((pd = kzalloc(sizeof(struct procdata), GFP_KERNEL)) != NULL) {
383 sprintf(pd->log_name, "%s%d", PROC_LOG_BASENAME, card->myid);
384 pd->log = proc_create(pd->log_name,
388 init_waitqueue_head(&(pd->rd_queue));
390 card->proclog = (void *) pd; /* remember procfs structure */
403 struct procdata *pd;
405 if ((pd = (struct procdata *) card->proclog) != NULL) {
406 if (pd->log)
407 remove_proc_entry(pd->log_name, hysdn_proc_entry);
408 kfree(pd); /* release memory */